A pytorch implementation of YOLOv1-v3.
Project only supports python3.x.
- torch 0.3.1
- opencv-python
- torchvision
- numpy
- pillow
- argparse
Data of VOC format(lxml) -> YOLO format(txt).
You can use the script in ./TOOL/voc2yolo.py to complete the work of conversion.
- Usage
- modify Line<13~15> according to your needs
- run "python3 voc2yolo.py"
Run k-means clustering on the dimensions of bounding boxes to get good priors for our model.
You can use the script in ./TOOL/genPriors/genPriors.py to get the good priors.
- Usage
- modify the options.json according to your needs
- run "python3 genPriors.py"
pip install -r requirements.txt
modify the config.py-yolo2_options
- set mode -> train
- set weightfile -> darknet19_448.conv.23
- set clsnamesfile -> coco.names, voc.names, etc.
- set trainSet, testSet, cfgfile, gpus, ngpus, etc.
run "python3 train.py --version yolo2"
pip install -r requirements.txt
modify the config.py-yolo3_options
- set mode -> train
- set weightfile -> darknet53.conv.74
- set clsnamesfile -> coco.names, voc.names, etc.
- set trainSet, testSet, cfgfile, gpus, ngpus, etc.
run "python3 train.py --version yolo3"
modify the config.py-yolo2_options
- set mode - test
- set weightfile -> yolov2.weights
- set clsnamesfile -> coco.names, voc.names, etc.
run "python3 detector.py --version yolo2"
modify the config.py-yolo3_options
- set mode - test
- set weightfile -> yolov3.weights
- set clsnamesfile -> coco.names, voc.names, etc.
run "python3 detector.py --version yolo3"