From 87c6540a80c8e0a3b6e998340583109c57388e68 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Fri, 15 Dec 2023 12:15:33 -0500 Subject: [PATCH] Now include json in model zip along with onnx file and .pt file --- scripts/train.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/train.sh b/scripts/train.sh index f74929d..8275bd0 100644 --- a/scripts/train.sh +++ b/scripts/train.sh @@ -49,7 +49,7 @@ if [ ! -f "${UNZIPPED}/data.yaml" ]; then fi FULLDEST=$(realpath "${UNZIPPED}") -python scripts/data.py "${FULLDEST}/data.yaml" +python scripts/data.py "${FULLDEST}/data.yaml" "${NAME}" cd yolov5 source env/bin/activate @@ -84,11 +84,13 @@ fi MODELPATH=$(realpath "../models/${ID}/weights/best.onnx") PTPATH=$(realpath "../models/${ID}/weights/best.pt") +JSONPATH=$(realpath "${FULLDEST}/${NAME}.json") ZIPPATH="${ID}.zip" mkdir zip cp "${MODELPATH}" "zip/${NAME}.onnx" cp "${PTPATH}" "zip/${NAME}.pt" +cp "${JSONPATH}" "zip/${NAME}.json" cd zip zip "../${ZIPPATH}" * cd ..