- Download the data (33gb) from the email.(Private)
- Clone https://github.com/ultralytics/yolov5 into the present working directory
- Add a new folder "imagedata"
- Add two more folders "images" and "labels"
(imagedata/images, imagedata/labels)
. - Add "train" folder under both images and labels
(imagedata/images/train, imagedata/labels/train)
- Put all the labels from CVAT into the
imagedata/labels/train
folder
- Add two more folders "images" and "labels"
- Run main.ipynb.
- Create
image.yaml
in the yolov5 directory.- Add the below contents to the file
path: imagedata/
train: images/train
val: images/train
nc: 1
names: ["stroke"]
- Then run:
cd yolov5
- For training:
python train.py --img 1024 --batch 1 --epochs 1 --data image.yaml
- For detection (use any video):
python detect.py --source ../data/videos/<video name>.mp4 --weights best.pt
- The output video can be viewed in the folder
./yolov5/runs/detect/exp*