Open PROGRAMMINGENGINEER-NIKI opened 4 years ago
I dont think this is possible without adding some functionality yourself. You cant compare two images by comparing the confidence factor because this will vary by angel, light etc. You could try to extract the bbox and compare them to others which you previous saved.
@PROGRAMMINGENGINEER-NIKI If you want to compare images which are not the sequence frames from 1 video, then you should use Siamese networks to compare trucks, which are not implemented in the Darknet.
Otherwise, if you use 1 video (file/camera) then you can train https://github.com/AlexeyAB/darknet/files/3199770/yolo_v3_tiny_lstm.cfg.txt model as described there https://github.com/AlexeyAB/darknet/issues/3114#issuecomment-494154586
Un-comment this line: https://github.com/AlexeyAB/darknet/blob/master/src/yolo_console_dll.cpp#L16
Compile Darknet with LIBSO=1 in the Makefile
And run detection:
LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH ./uselib data/coco.names cfg/yolov3.cfg yolov3.weights test.mp4
So there will be Detection (Yolo) and Tracking (Optical flow), so each object will have unique trakc_id.
Hi, @AlexeyAB . I have downloaded yolo_v3_tiny_pan_lstm.cfg.txt and weights-file. I wonder that whether the .name file should be changed or not, and can it work with yolo_cpp_dll directly?
can it work with yolo_cpp_dll directly?
Yes.
.name file should be changed
It depends on names of your objects
@AlexeyAB , Thanks for your quick reply! Well, the weights file is downloaded from the link you offered and I have no idea what objects it was trained with... I have tried to use coco.names directly but it detect cars as "person".
Hello @AlexeyAB
Thank you for your effort in making this repository.
I've been recently using the YOLO to detect trucks in images, which turned out really well. My next step is to try to find images of the same truck across the whole set of images I've retrieved earlier. To me, the input of the system is an image and its outputs are k candidate images, ranked accordingly to the system's confidences. In other words, the system will try to match an image with the other images he works with.
My question is how can one reidentify trucks after detecting them through the YOLO network? Please advise! Thanks