git clone
Ycb_Yolov5_Trainer (Clone to any folder other than your Ycb_Dataset_Generator folder)cd ./Ycb_Yolov5_Trainer
- Setup and install
Python 3.7.12
orPython 3.8.0
using Pyenv. CREATE and ACTIVATE a new python environment named 'YCB_Trainer' running Python 3.7.12 or Python 3.8.0. (This step is required to successfully meet all the requirements)pyenv virtualenv 3.7.12 YCB_Trainer
(Install python and create python virtual environment)- (Only for the initial setup)
pyenv local YCB_Trainer
(Activate python virtual environment) pyenv versions
(Check if the correct virtual environment with intended python version is active)
pip install -r ./Requirements/requirements.txt
(Installs Ycb_Yolov5_Trainer's requirements)- Move/copy your custom dataset generated from following the steps on Ycb_Dataset_Generator to the current directory.
-
mv ../Ycb_Dataset_Generator/custom_dataset .
-
cp ../Ycb_Dataset_Generator/custom_dataset .
-
git clone
yolov5 (Clones ultralytics's yolov5 repository)cd ./yolov5
pip install -r requirements.txt
(Installs ultralytics's yolov5's requirements)- Training a model (Transfer learning with ultralytic's pretrained checkpoints - faster & accurate):
-
python ./train.py --img 640 --batch 16 --epochs 500 --data ../custom_dataset/data.yaml --cfg ./models/custom_yolov5s6.yaml --weights 'yolov5s6.pt' --name yolov5s6_results --cache
- pretrained weights (more checkpoints available on ultralytics/yolov5 repository): yolov5s6
- epochs (more number of epochs possible): 500
- batch (higher number is possible with better hardware)
-
- Deploying custom trained model (Real Time Detection):
- Collab's implementation:
python ../yolov5Deploy.py live -1 ./runs/train/yolov5s6_results/weights/best.pt --mode 1
- Ultralytic's implementation:
python ./detect.py --source -1 --weights ./runs/train/yolov5s6_results/weights/best.pt
- Collab's implementation:
-
Notifications
You must be signed in to change notification settings - Fork 0
VT-Collab/Ycb_Yolov5_Trainer
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published