clean
This commit is contained in:
@@ -189,8 +189,7 @@ aihub:
|
|||||||
output_dir: build/qai-hub/meter-detection
|
output_dir: build/qai-hub/meter-detection
|
||||||
```
|
```
|
||||||
|
|
||||||
Use the same image size configured in `sagemaker.training.hyperparameters.imgsz`. For example, a smoke-test model
|
Use the same image size configured in `sagemaker.training.hyperparameters.imgsz`. For example, a smoke-test model trained with `imgsz: 320` requires `images: [[1, 3, 320, 320], float32]`.
|
||||||
trained with `imgsz: 320` requires `images: [[1, 3, 320, 320], float32]`.
|
|
||||||
|
|
||||||
## 7. Prepare AI Hub Inputs
|
## 7. Prepare AI Hub Inputs
|
||||||
|
|
||||||
@@ -207,8 +206,7 @@ examples/meter-detection/data/aihub_calibration/*.npy
|
|||||||
examples/meter-detection/data/inputs.npz
|
examples/meter-detection/data/inputs.npz
|
||||||
```
|
```
|
||||||
|
|
||||||
The script applies the preprocessing expected by the exported YOLO model: aspect-ratio-preserving letterboxing,
|
The script applies the preprocessing expected by the exported YOLO model: aspect-ratio-preserving letterboxing, RGB channel order, channel-first layout, and pixel values normalized to `[0, 1]`.
|
||||||
RGB channel order, channel-first layout, and pixel values normalized to `[0, 1]`.
|
|
||||||
|
|
||||||
Set `--image-size` to the training `imgsz` value when it is not `640`.
|
Set `--image-size` to the training `imgsz` value when it is not `640`.
|
||||||
|
|
||||||
@@ -223,15 +221,11 @@ qc-cli ai-hub upload \
|
|||||||
--from-job qc-cli-YYYYMMDD-HHMMSS
|
--from-job qc-cli-YYYYMMDD-HHMMSS
|
||||||
```
|
```
|
||||||
|
|
||||||
The command downloads the job's `model.tar.gz`, finds `model.onnx`, uploads it to AI Hub, and runs quantization,
|
The command downloads the job's `model.tar.gz`, finds `model.onnx`, uploads it to AI Hub, and runs quantization, compilation, validation, and profiling. The uploaded source model uses the configured `aihub.model_name`.
|
||||||
compilation, validation, and profiling. The uploaded source model uses the configured
|
|
||||||
`aihub.model_name`.
|
|
||||||
|
|
||||||
The training example sanitizes the Ultralytics ONNX export before saving `model.onnx`. This removes graph input or
|
The training example sanitizes the Ultralytics ONNX export before saving `model.onnx`. This removes graph input or output names, such as `output0`, that are duplicated in the ONNX `value_info` metadata and rejected by AI Hub.
|
||||||
output names, such as `output0`, that are duplicated in the ONNX `value_info` metadata and rejected by AI Hub.
|
|
||||||
|
|
||||||
For a model already downloaded by a failed upload attempt, sanitize the extracted ONNX file and retry using the local
|
For a model already downloaded by a failed upload attempt, sanitize the extracted ONNX file and retry using the local model. Replace the job name in both paths:
|
||||||
model. Replace the job name in both paths:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run --with onnx python examples/meter-detection/source/sanitize_onnx.py \
|
uv run --with onnx python examples/meter-detection/source/sanitize_onnx.py \
|
||||||
@@ -244,8 +238,7 @@ qc-cli ai-hub upload \
|
|||||||
--onnx-path build/qai-hub/meter-detection/model.aihub.onnx
|
--onnx-path build/qai-hub/meter-detection/model.aihub.onnx
|
||||||
```
|
```
|
||||||
|
|
||||||
If the meter-detection job is still the last training job in `.qc-cli.json`, `--from-job` can be omitted. Keeping it
|
If the meter-detection job is still the last training job in `.qc-cli.json`, `--from-job` can be omitted. Keeping it explicit prevents accidentally uploading an artifact from a different training run.
|
||||||
explicit prevents accidentally uploading an artifact from a different training run.
|
|
||||||
|
|
||||||
To resume after a completed step, use one of:
|
To resume after a completed step, use one of:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user