dnn darknet cifar classifier[SOLVED] [closed]

asked 2019-07-22 06:05:07 -0500

Shay Weissman gravatar image

updated 2019-07-22 21:30:56 -0500

supra56 gravatar image

OpenCV => 3.4.5 Operating System / Platform => Windows 7/10 64 Bit Compiler => Visual Studio 2015 Languege C++ I trained a cifar_small cfg for car color classifier. It performs well using yolo_cpp_dll but the results are corrupted using opencv 345 and 346. Any Idea? Maybe I do not prepare well the data by cv::dnn::blobFromImage(img, 1.0 / 255.F, cv::Size(112, 112), cv::Scalar(127.5, 127.5, 127.5), true, false, CV_32F); Thanks

edit retag flag offensive reopen merge delete

Closed for the following reason not a real question by berak
close date 2019-07-22 23:38:55.838217

Comments

but the results are corrupted

can you explain ?

berak gravatar imageberak ( 2019-07-22 07:08:49 -0500 )edit
1

I solved it using

cv::Mat inputBlob = cv::dnn::blobFromImage(img, 1.0 / 255.F, cv::Size(112, 112), cv::Scalar(), true, false);
Shay Weissman gravatar imageShay Weissman ( 2019-07-22 09:32:22 -0500 )edit
1

But there is a bug in opencv 345. didnt test 346 yet.

I use 2 netowrks: 1) for car detection and model classification (toyota, mazda ... 2 is the car color classifie

When I test the car color classifier only I get "softamax_10" after calling get getOutputsName When I test both networks and call getOutputName I get yolo_16 and yolo_23 I guess this is opencv bug

Shay Weissman gravatar imageShay Weissman ( 2019-07-22 09:38:54 -0500 )edit
1

After I hardcoded set to "softmax_10" the system with 2 networks work fine.

Shay Weissman gravatar imageShay Weissman ( 2019-07-22 09:41:59 -0500 )edit