Open buzdarbalooch opened 5 years ago
@AlexeyAB . sir reply from you shall be really appreciable
@buzdarbalooch
For example you have video stream from camera 1920x1080 30fps
This code captures frames 1920x1080 with speed 30fps - 33ms per frame https://github.com/AlexeyAB/darknet/blob/master/src/yolo_console_dll.cpp
Yolo detects objects on resized frames to 416x416 with speed 10 fps (detect only for each 3rd frame - 100ms per frame)
Once Yolo have detected objects, we know that these detected objects are from current_frame-2
, because detection lasted a long time - 100ms per frame. So we should get 2 frames from our buffer with old frames (current_frame-2
and current_frame-1
), and do Tracking (optical flow): current_frame-2
->current_frame-1
then current_frame-1
->current_frame
- now we know where are objects on the current_frame. It is fast, because Tracking using optical flow can achive more than >500 fps - <2ms per frame.
Then we Track (optical flow) objects on images 1920x1080 or each frame (all 30fps) until Yolo do new detection
After each Yolo-detection we can
thank you soo much. Anothr important question.
I actually made some video approximately 4 mins, then annotated it with the objects present in the video . Now for that video it detects cr, hp_slots as you have seen before. My question is if i want to enlarge the dataset with similar videos. How can i do that. ? How can i enlarge the similar system which is working. Secondly, without adding videos can i just add random pics of cars to enlarge the system.
@buzdarbalooch
Do you want to increase dataset, and continue training with larger dataset?
Just grab frames from video: https://github.com/AlexeyAB/Yolo_mark
./yolo_mark x64/Release/data/img cap_video test.mp4 10
./darknet detector test cfg/obj.data yolov3_obj.cfg yolov3_obj_10000.weights -dont_show -save_labels < data/train_new.txt
Where is train_new.txt
contains paths to the images without txt-lebel-files, so they will be created by using already trained your yolov3_obj_10000.weights
file. Then you should check corecctness of these labels by using Yolo_mark. And then you can continue training with old+new images, concatenate train_old.txt
and train_new.txt
to the single train.txt
and continue training:/darknet detector train cfg/obj.data yolov3_obj.cfg yolov3_obj_10000.weights
I want to continue traning with larger dataset. if i have to take some new dataset which contains same classes of objects can't i just merge the two dataset, the one already trained and the new one.
so the train_old.txt + train_new.txt i just simple merge them in a single file. Q is how i can utlize the weights whch already exist, for the model i trained on the previous images. or i have to start the training from the scrath.
But instead of YOLO_MARK , i can use other tools such as LabelImg
Q is how i can utlize the weights whch already exist, for the model i trained on the previous images. or i have to start the training from the scrath.
If you train for the same classes and the same number of classes then just train
/darknet detector train cfg/obj.data yolov3_obj_new.cfg yolov3_obj_previous.weights -clear
What is exactly the purpose of -clear
?
@iraadit -clear
just resets interation number in the weights-file
@AlexeyAB .if you can kindly give some explanation it would be so nice of you.