Ask Your Question
0

yolov3 accuracy

asked 2018-11-30 04:44:43 -0600

nitsan57 gravatar image

updated 2018-12-01 13:01:19 -0600

Hello, The new version 4 is awesome for the fast dnn speed.

However when I use the dnn(and load yolo weight and cfg). It's not as accurate as original Yolo version. I doubt it's due to the optimization dnn has made. The yolo I am using is yoloV3. I test on a image, and save the detection frame. In some frame the result is just missing.

Here is the Images: Images Could anyone help?

edit retag flag offensive close merge delete

Comments

Hmm i am wondering why you are not using yolo native? Is opencv4 faster with evaluation or have better accuracy? If not - i would just say stick to yolo native.

holger gravatar imageholger ( 2018-11-30 05:34:29 -0600 )edit

Hi, Im building an appliction using opencv and part of it is detections of objects. Running darknet.exe appart will add a complexity that i might can avoid. further more, opencv detection are faster using cpu, but are not accurate, there is any fix? i used the dnn tutorial, with thresh 0.5 nms = 0.4 scale = 1/255. Thanks

nitsan57 gravatar imagenitsan57 ( 2018-11-30 05:43:45 -0600 )edit

Well running a model on top of opencv adds complexity too? The stuff you are dealing with right now - and the source of you question.

Yes opencv is fast on cpu cause they have optimized code for this. But i run my models on GPU anyway cause i need to be fast.

Its very promising to use opencv as a cross platform cnn/dnn but i found it very time consuming as there was always some little things which went wrong.

From my personal experience i use opencv for low level task like image generation / augmentation and leave the rest up to the cnn/dnn of my choice (yolo or tensorflow). Its just not worth putting so much time into building a monolith which will not work anyway and break on changes on the yolo side.

I hope i dont get downvoted for this - but this is my experience /opinion.

holger gravatar imageholger ( 2018-11-30 07:22:43 -0600 )edit

thanks for the replay, maybe i will try to include direclty yolo dll.

nitsan57 gravatar imagenitsan57 ( 2018-11-30 07:25:15 -0600 )edit

That what i do and i have a wrapper around it. So i can consume yolo from every other application regardless of java php or javascript or whatever. All they need to do is call a rest api. This concept is called Microservice

holger gravatar imageholger ( 2018-11-30 07:59:18 -0600 )edit

@nitsan57, no one can help you until you describe what "It's not as accurate as original Yolo version." means and which YOLO version is used. Have you tried to use OpenCV's https://github.com/opencv/opencv/blob... sample? Which image is used for tests?

dkurt gravatar imagedkurt ( 2018-12-01 08:50:57 -0600 )edit

Hello! Im using yolov3 608 608 weights from their site. I used images that i took the picture. In darknet.exe it detected more object then with opencv4. I used the dnn tutorial of opencv4 with the parameters that i mentioned in original question. I must emphasize that opencv detected objects indeed but less.. Thank you.

nitsan57 gravatar imagenitsan57 ( 2018-12-01 09:12:32 -0600 )edit

@nitsan57, "more" and "less" is a wrong way to describe the problem. We cannot try ALL the images from internet to catch it. Please attach three images: an origin image in .png format, resulting image from darknet and resulting image from OpenCV.

dkurt gravatar imagedkurt ( 2018-12-01 11:16:14 -0600 )edit

@dkurt hi, i uploaded one example.

nitsan57 gravatar imagenitsan57 ( 2018-12-01 13:01:53 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-12-03 04:41:24 -0600

dkurt gravatar image

updated 2018-12-03 04:43:27 -0600

Cannot reproduce your results using OpenCV's object detection sample: https://github.com/opencv/opencv/blob...

python object_detection.py yolo --input h8bogUd.jpg --thr 0.1

May I ask you also prepare 416x416 image in PNG format and pass it into Darknet? We need to reduce an impact of different interpolation strategies which are applied in Darknet in OpenCV.

image description

edit flag offensive delete link more

Comments

@dkurt Hi, The object detection is wrong..Boat. I can manage to get this also by using thresh 0.1. buy with normal darknet its works fine as i show.

nitsan57 gravatar imagenitsan57 ( 2018-12-03 04:51:27 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-11-30 04:44:43 -0600

Seen: 1,556 times

Last updated: Dec 03 '18