-
-
Notifications
You must be signed in to change notification settings - Fork 585
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #444 from PINTO0309/YOLOv9-shoulder-elbow-knee
YOLOv9 shoulder elbow knee
- Loading branch information
Showing
29 changed files
with
5,650 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
890 changes: 890 additions & 0 deletions
890
463_YOLOv9-Shoulder-Elbow-Knee/demo/demo_yolov9_onnx_sholder_elbow_knee.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
curl "https://s3.ap-northeast-2.wasabisys.com/pinto-model-zoo/463_YOLOv9-Shoulder-Elbow-Knee/resources_c.tar.gz" -o resources.tar.gz | ||
tar -zxvf resources.tar.gz | ||
rm resources.tar.gz | ||
|
||
echo Download finished. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
curl "https://s3.ap-northeast-2.wasabisys.com/pinto-model-zoo/463_YOLOv9-Shoulder-Elbow-Knee/resources_e_nopost.tar.gz" -o resources.tar.gz | ||
tar -zxvf resources.tar.gz | ||
rm resources.tar.gz | ||
|
||
echo Download finished. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
curl "https://s3.ap-northeast-2.wasabisys.com/pinto-model-zoo/463_YOLOv9-Shoulder-Elbow-Knee/resources_e_withpost.tar.gz" -o resources.tar.gz | ||
tar -zxvf resources.tar.gz | ||
rm resources.tar.gz | ||
|
||
echo Download finished. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
curl "https://s3.ap-northeast-2.wasabisys.com/pinto-model-zoo/463_YOLOv9-Shoulder-Elbow-Knee/resources_s.tar.gz" -o resources.tar.gz | ||
tar -zxvf resources.tar.gz | ||
rm resources.tar.gz | ||
|
||
echo Download finished. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
curl "https://s3.ap-northeast-2.wasabisys.com/pinto-model-zoo/463_YOLOv9-Shoulder-Elbow-Knee/resources_t.tar.gz" -o resources.tar.gz | ||
tar -zxvf resources.tar.gz | ||
rm resources.tar.gz | ||
|
||
echo Download finished. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
https://github.com/WongKinYiu/yolov9 | ||
|
||
https://github.com/PINTO0309/onnx2tf | ||
https://github.com/PINTO0309/simple-onnx-processing-tools | ||
https://github.com/PINTO0309/tflite-input-output-rewriter | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
TYPE=e | ||
# RELU= or RELU=-relu | ||
RELU= | ||
RELUS=$(echo ${RELU} | sed 's/-/_/g') | ||
MODEL_NAME=yolov9_${TYPE}_sek | ||
SUFFIX="0100_1x3x" | ||
# best-t.pt | ||
# best-t-relu.pt | ||
# best-e.pt | ||
# best-e-relu.pt | ||
MODEL_PATH=best-${TYPE}-sek.pt #best-${TYPE}${RELU}.pt | ||
|
||
RESOLUTIONS=( | ||
"128 160" | ||
"128 256" | ||
"192 320" | ||
"192 416" | ||
"192 640" | ||
"192 800" | ||
"256 320" | ||
"256 416" | ||
"256 448" | ||
"256 640" | ||
"256 800" | ||
"256 960" | ||
"288 1280" | ||
"288 480" | ||
"288 640" | ||
"288 800" | ||
"288 960" | ||
"320 320" | ||
"384 1280" | ||
"384 480" | ||
"384 640" | ||
"384 800" | ||
"384 960" | ||
"416 416" | ||
"480 1280" | ||
"480 640" | ||
"480 800" | ||
"480 960" | ||
"512 512" | ||
"512 640" | ||
"512 896" | ||
"544 1280" | ||
"544 800" | ||
"544 960" | ||
"640 640" | ||
"736 1280" | ||
"576 1024" | ||
"384 672" | ||
) | ||
|
||
python reparameterization${RELUS}.py \ | ||
--type ${TYPE} \ | ||
--cfg ./models/detect/gelan-${TYPE}${RELU}.yaml \ | ||
--weights ${MODEL_PATH} \ | ||
--save ${MODEL_NAME}${RELUS}.pt | ||
|
||
for((i=0; i<${#RESOLUTIONS[@]}; i++)) | ||
do | ||
RESOLUTION=(`echo ${RESOLUTIONS[i]}`) | ||
H=${RESOLUTION[0]} | ||
W=${RESOLUTION[1]} | ||
|
||
python export.py \ | ||
--data data/original.yaml \ | ||
--weights ${MODEL_NAME}${RELUS}.pt \ | ||
--imgsz ${H} ${W} \ | ||
--batch-size 1 \ | ||
--device cpu \ | ||
--opset 13 \ | ||
--include onnx | ||
|
||
mv ${MODEL_NAME}${RELUS}.onnx ${MODEL_NAME}${RELUS}_${SUFFIX}${H}x${W}.onnx | ||
|
||
sng4onnx \ | ||
--input_onnx_file_path ${MODEL_NAME}${RELUS}_${SUFFIX}${H}x${W}.onnx \ | ||
--output_onnx_file_path ${MODEL_NAME}${RELUS}_${SUFFIX}${H}x${W}.onnx | ||
|
||
onnxsim ${MODEL_NAME}${RELUS}_${SUFFIX}${H}x${W}.onnx ${MODEL_NAME}${RELUS}_${SUFFIX}${H}x${W}.onnx | ||
onnxsim ${MODEL_NAME}${RELUS}_${SUFFIX}${H}x${W}.onnx ${MODEL_NAME}${RELUS}_${SUFFIX}${H}x${W}.onnx | ||
onnxsim ${MODEL_NAME}${RELUS}_${SUFFIX}${H}x${W}.onnx ${MODEL_NAME}${RELUS}_${SUFFIX}${H}x${W}.onnx | ||
done | ||
|
||
python export.py \ | ||
--data data/original.yaml \ | ||
--weights ${MODEL_NAME}${RELUS}.pt \ | ||
--device cpu \ | ||
--opset 13 \ | ||
--include onnx \ | ||
--dynamic | ||
mv ${MODEL_NAME}${RELUS}.onnx ${MODEL_NAME}${RELUS}_Nx3HxW.onnx | ||
onnxsim ${MODEL_NAME}${RELUS}_Nx3HxW.onnx ${MODEL_NAME}${RELUS}_Nx3HxW.onnx |
Oops, something went wrong.