Add yolov5 as submodule and place to put trained files
This commit is contained in:
parent
a7e9c5cbf3
commit
559e0777cf
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "yolov5"]
|
||||||
|
path = yolov5
|
||||||
|
url = https://github.com/ultralytics/yolov5.git
|
|
@ -0,0 +1,3 @@
|
||||||
|
*
|
||||||
|
|
||||||
|
!.gitignore
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd yolov5
|
||||||
|
python -m venv env
|
||||||
|
source env/bin/activate
|
||||||
|
python -m pip install -r requirements.txt
|
|
@ -46,5 +46,19 @@ if [ ! -f "${UNZIPPED}/data.yaml" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FULLDEST=$(realpath "${DEST}")
|
FULLDEST=$(realpath "${UNZIPPED}")
|
||||||
python scripts/data.py "${FULLDEST}/data.yaml"
|
python scripts/data.py "${FULLDEST}/data.yaml"
|
||||||
|
|
||||||
|
cd yolov5
|
||||||
|
source env/bin/activate
|
||||||
|
|
||||||
|
WEIGHTS="yolov5s.pt"
|
||||||
|
|
||||||
|
if [[ "${MODEL}" == "yolov5m_onnx" ]]; then
|
||||||
|
WEIGHTS="yolov5m.pt"
|
||||||
|
else if [[ "${MODEL}" == "yolov5l_onnx" ]]; then
|
||||||
|
WEIGHTS="yolov5l.pt"
|
||||||
|
fi
|
||||||
|
|
||||||
|
python train.py --img 640 --batch 16 --epochs 300 --data "${FULLDEST}/data.yaml" --weights "${WEIGHTS}" --cache --project ../models/ --name "${ID}"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 0004c745daeebb0eb6455b90c3e8abb308e61320
|
Loading…
Reference in New Issue