Open clydebailey opened 5 years ago
@clydebailey Hi,
Can you explain it with more details, what do you mean?
Currently, you can use Pseudo labeling concept from fast.ai: https://github.com/AlexeyAB/darknet/issues/717
For example, you have two models yolov3.cfg
/weights & yolov3-tiny.cfg
/weights.
You should find any very Large un-labeled dataset, for example http://www.image-net.org/challenges/LSVRC/2012/nnoupb/ILSVRC2012_img_train.tar (138GB - 1.2 millions images)
collect paths to images to the one file new_train.txt
run pseudo-labeling by using Big model yolov3.cfg
/weights in such a way:
./darknet detector test cfg/obj.data yolov3.cfg yolov3.weights -thresh 0.25 -dont_show -save_labels < data/new_train.txt
(It will create labels (txt-files) for each image in the new_train.txt
)
set train=new_train.txt
in obj.data
file
Continue train your Small model by using this Large now labeled dataset
./darknet detector test cfg/obj.data yolov3-tiny.cfg backup/yolov3-tiny_10000.weights -map
Hello @AlexeyAB, thanks for your prompt reply! Yes for the time being I am using the pseudo labelling concept to train my student (tiny-yolov3 ) network from my teacher (yolov3) network. But I was looking at a particular framework. Could you help me in implementing this:
Thanks
@clydebailey Hi,
The Big network should run periodically to train the small network. This would reduce the power consumption and inference time.
Do you want to continue to train a small network on CPU (SoC (raspberry pi)) ?
Hello @AlexeyAB
@clydebailey Hi,
So just try to train two model yolov3-tiny.cfg
and yolov3.cfg
Then run yolov3-tiny.cfg for detection from your video
Use script, that periodically kills darknet-process with yolov3-tiny.cfg
After that (or in parallel) you can run Yolo_mark that collects each 100 frame from Network-camera video-stream and saves it as jpg-image:
./yolo_mark data/img cap_video test.mp4 100
then run Detection on these collected jpg-images by using big model yolov3.cfg with pseudo-labeling:
./darknet detector test cfg/coco.data cfg/yolov3.cfg yolov3.weights -thresh 0.25 -dont_show -save_labels < data/new_train.txt
then run continue of Training on these labeled images
./darknet detector train cfg/coco.data cfg/yolov3.cfg yolov3.weights
Sorry for the late reply and thanks again for your help @AlexeyAB Respect from India :)
Hello @AlexeyAB. I have trained a heavy network (yolov3) and a tiny network (tiny_yolov3). How can I connect them to act as a teacher-student network.
Regards! Clyde