darknet to pytorch
This is a pytorch version of YAD2K。
Original paper: YOLO9000: Better, Faster, Strongerby Joseph Redmond and Ali Farhadi.
Download Darknet model cfg and weights from the official YOLO website.
# for example --- or other version cfg and weights
wget http://pjreddie.com/media/files/yolo.weights
wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolo.cfg
Note: you can download other types: like yolo-voc.cfg
Convert the weights to .pth
python tools/yad2t.py path-to-yolo-cfg path-to-yolo-weights path-to-output-folder
Note: default choose
yolo.cfg
and yolo.weights
to the directory config
model
Three demos (picture, camera, video)
demo.py
python demo.py pic-path yolo-type --cuda=True
Note: default choose
results/demo
yolo-type
is yolo
: three kinds: [yolo, tiny-yolo-voc, yolo-voc]
demo_cam.py
python demo_cam.py --trained_model=pth_model_from_1
demo_video.py
python demo_video.py --demo_path=video_path --trained_model=pth_model_from_1