darknet
darknet copied to clipboard
Darknet Yolo v2 is added to the OpenCV
Now Darknet Yolo v2 is added to the OpenCV: https://github.com/opencv/opencv/pull/9705 You can use it from master-branch or since OpenCV 3.4.0 will be released. There is example how to use Yolo v2: https://github.com/opencv/opencv/blob/master/samples/dnn/yolo_object_detection.cpp For now it CPU-only (~5-10 times faster than original) and can be used on mobile devices, but in the future GPU will be supported.
If there will be many upvotes, perhaps I will add support for Yolo 9000: https://github.com/opencv/opencv/pull/9705 Don't write anything there, just upvote :)
video capture next, please?:)
@AlexeyAB I saw the issue in the OpenCV repository, but it's not clear if also the "GPU version" of YOLO will be available.
@AlexeyAB, I'm using your windows port of Darknet and I would like to use darknet with OpenCV. Do you think you can add GPU support ? And Yolo 9000 support of course :). It would be great !
Many Thanks for your valuable work !
@AlexeyAB actually i am using three versions of darknet, (yolo_v2 with opencv, yolo_v2 with cuda and yolo_v3 with cuda) now i am trying to get yolo_v3 working with opencv but the "shortcut" layer is not implemented, (i think is similar as the "route" layer from v2.. ) i dont know how i can put the "activation=linear" option on the opencv so i cannot read it, i was trying to create my own reader-function modifying the .src files but no success, do you have any ideas how this can be solved? or if there is any plan on adding support for yolo_v3 on opencv? thanks!
@AlexeyAB I am writing code to use yolo_v2 with OpenCV in python but I am not getting correct detections. can you please tell me how to parse the output detections. means how to get box coordinates and how to get class with class score.
Thanks in advance!
@AlexeyAB can you explain about activation= linear and activation= leaky
@abdulkalam1233
-
linear
isIdentity
-activation:y = x
https://github.com/pjreddie/darknet/blob/f6d861736038da22c9eb0739dca84003c5a5e275/src/activations.h#L31
-
leaky
isLeaky ReLU
-activation:if(x<0) { y=x*0.01; } else { y = x; }
https://github.com/pjreddie/darknet/blob/f6d861736038da22c9eb0739dca84003c5a5e275/src/activations.h#L38
About Leaky rectified linear unit (Leaky ReLU)
: https://en.wikipedia.org/wiki/Activation_function#Comparison_of_activation_functions
Yolo v3 is added to the OpenCV too: https://github.com/opencv/opencv/pull/11322
@AlexeyAB Thanks man. You are awesome
is yolo9000 planned to be integrated? If not, what does it take to do this?
@streamnsight
Yolo9000 isn't planned to be integrated (should be implemented softmax-tree in the region_layer.cpp
)
May be better to use Yolov3 multilabel training instead of Yolo9000: https://arxiv.org/pdf/1804.02767v1.pdf
@AlexeyAB thanks for the note I'm looking to use a trained model. Is there weight files available for more than 80 classes that work with the current OpenCV implementation?
@streamnsight
yolov3-openimages.cfg
is for 601 classes.
https://github.com/AlexeyAB/darknet#pre-trained-models-for-different-cfg-files-can-be-downloaded-from-smaller---faster--lower-quality
yolov3-openimages.cfg
(247 MB COCO Yolo v3) - requires 4 GB GPU-RAM: https://pjreddie.com/media/files/yolov3-openimages.weights
@AlexeyAB Thanks for the help. Sorry I'm kind new at this and having issues:
I got the cfg
from https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov3-openimages.cfg
the class names from https://github.com/AlexeyAB/darknet/blob/master/data/openimages.names
and the weights from your link above https://pjreddie.com/media/files/yolov3-openimages.weights, but i get very poor results. I have to drop the confidence down to 5% to get anything and then results are very generic (like 'Animal' for a 'bear', or another where yolov3 gives me 'diningtable', 'bottle', 'wine glass', 'knife', returns just 'Tool')
Using the same exact code to load and eval the model. Am I missing something?
@AlexeyAB Can you also add support for yolo9000 please?
@AlexeyAB @pjreddie Can you please provide more information/support on yolo9000? How the data is prepared in a tree structure? How it is used for the model training?