Skip to content

Commit

Permalink
Create models
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Jan 8, 2024
1 parent 354aafa commit 456a699
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions opencv_test/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,24 @@ void trydnn()
using namespace cv::dnn;
using namespace cv;
auto net = readNetFromDarknet(
"/home/matt/Downloads/yolov4-csp-swish.cfg",
"/home/matt/Downloads/yolov4-csp-swish.weights");
"/home/coolpi/rknn_java/opencv_test/yolov4-csp-swish.cfg",
"/home/coolpi/rknn_java/opencv_test/yolov4-csp-swish.weights");

net.setPreferableBackend(DNN_BACKEND_OPENCV);
net.setPreferableTarget(DNN_TARGET_OPENCL);


auto img = cv::imread("../src/test/resources/bus.jpg");
auto blob = blobFromImage(img, 1.0 / 255.0, {640, 640});

cout << "got names\n";

std::vector<String> names = net.getUnconnectedOutLayersNames();
for (const auto& n : names) cout << n << " ";
cout << endl;


auto img = cv::imread("../../src/test/resources/bus.jpg");
auto blob = blobFromImage(img, 1.0 / 255.0, {640, 640});

// std::vector<String> names = {
// "yolo_167", "yolo_171", "yolo_175"};

Expand Down

0 comments on commit 456a699

Please sign in to comment.