Task for changing the bounding / anchor boxes from rectangles to ellipses (in train, val and detect) by Silvey Yu
Demo: On YouTube
- Setup the virtual envrionment on your computer
pip3 install virtualenv
virtualenv test
source test/bin/activate
- Clone this repository
cd test
git clone https://github.com/SilvesterYu/YOLO_Silvey_Task.git
- Run setup
chmod -R 777 *.*
cd YOLO_Silvey_Task
chmod 0755 setup.sh
./setup.sh
pip3 list
If "Descriptors cannot be created directly" error occurs, run:
pip install protobuf==3.20.1
1. Test Train
To test the train, go into yolov5copy
directory
cd yolov5copy
Test train with
python train.py --data coco128.yaml --cfg yolov5s.yaml --weights '' --batch-size 128 --epochs 1
2. Test Val
To test the val, go into yolov5copy
directory
cd yolov5copy
Test val with
python val.py --data coco128.yaml --weights yolov5s.pt --img 640
3. Test Detection
To test the detection, go into yolov5copy
directory
cd yolov5copy
Then, get an image from internet
wget "https://a-z-animals.com/media/2021/12/Best-farm-animals-cow.jpg"
Run detection using
python3 detect.py --weights yolov5s.pt --img 640 --conf 0.25 --source 'Best-farm-animals-cow.jpg' --save-txt