I have a YOLO model to detect the location of traffic signs and I have another model that determine
what is the sign
my question is how can I send the detected signs from YOLO to the classifier then write the correct
label above the bounding box like the image below
Asked
Active
Viewed 429 times
0

all_alone
- 25
- 4
1 Answers
2
You can use OpenCV for this. Load the pretrained models(weights
, cfg
, caffemodel
, prototxt
, onnx
) using readNet
or readNetFrom...
.
For video use OpenCV dnn blobFromImage
to pass each frame to yolo net which detects bounding boxes. You may need to do Non-maximum Suppression. Crop the bounding boxes based on confidence and again pass the cropped image to dnn
vgg net which should give classification results.
To write labels get the (x,y)
position of each bounding box and use putText
with font size as offset on the original input image frame.

B200011011
- 3,798
- 22
- 33
-
it worked, but it takes a very long time in testing if I have a 1 min video it will run for 10+ min to get the results is there something can I do to make testing faster than that – all_alone Aug 09 '20 at 17:55
-
1You can look into using Lower Resolution Video, `Frame Skipping`, `Tracking`, GPU, `Yolo Tiny`. Using `smaller input` size such as 256x256 instead of 416x416 can further provide speed up. Using `1 color channel` images instead of 3 if not specifically required. Using a `CNN architecture` with less parameters than VGG will improve performance. New `Yolo V4` and `V5` is available with training code. There is also Binary CNN. Some of the above will improve performance but at the cost of some accuracy. – B200011011 Aug 10 '20 at 04:14
-
I also found that OpenCV is not working with GPU now it's compatible with GPU on collab and they said that the testing speed will improve by 1500% if you know anything about how to configure OpenCV with GPU I hope you provide my a link or something cuz it's new and almost there is no tutorial about how it works on collab – all_alone Aug 10 '20 at 16:13