Skip to content

SilvesterYu/YOLO_Silvey_Task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOLO Task

Image of Version Image of Dependencies

forthebadge

my badge

Task for changing the bounding / anchor boxes from rectangles to ellipses (in train, val and detect) by Silvey Yu

Demo: On YouTube

How to run

  1. Setup the virtual envrionment on your computer
pip3 install virtualenv
virtualenv test
source test/bin/activate
  1. Clone this repository
cd test
git clone https://github.com/SilvesterYu/YOLO_Silvey_Task.git
  1. Run setup
chmod -R 777 *.*
cd YOLO_Silvey_Task
chmod 0755 setup.sh
./setup.sh

⚠️ IMPORTANT: Make sure that you have torch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 exactly. You can check with

pip3 list

Testing

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

About

Changing the bounding boxes from square to ellipse

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published