This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:vim4:npu:demos:yolov7-tiny [2024/01/04 04:46] louis |
products:sbc:vim4:npu:demos:yolov7-tiny [2024/05/31 03:36] (current) louis |
||
---|---|---|---|
Line 56: | Line 56: | ||
if self.grid[i].shape[2: | if self.grid[i].shape[2: | ||
``` | ``` | ||
+ | |||
+ | <WRAP important> | ||
+ | yolo.py has many forward. Right place is class **IDetect** function **fuseforward**. | ||
+ | </ | ||
Then, run '' | Then, run '' | ||
Line 81: | Line 85: | ||
--inputs " | --inputs " | ||
--input-shapes | --input-shapes | ||
- | --inference-input-type float32 \ | ||
- | --inference-output-type float32 \ | ||
--dtypes " | --dtypes " | ||
--quantize-dtype int8 --outdir onnx_output | --quantize-dtype int8 --outdir onnx_output | ||
--channel-mean-value " | --channel-mean-value " | ||
--source-file dataset.txt | --source-file dataset.txt | ||
- | --iterations 500 \ | ||
- | --disable-per-channel False \ | ||
--batch-size 1 --target-platform PRODUCT_PID0XA003 | --batch-size 1 --target-platform PRODUCT_PID0XA003 | ||
``` | ``` | ||
- | |||
- | <WRAP important > | ||
- | Please prepare about 500 pictures for quantification. If the pictures size is smaller than model input size, please resize pictures to input size before quantification. | ||
- | </ | ||
Run '' | Run '' | ||
Line 110: | Line 106: | ||
```shell | ```shell | ||
$ git clone https:// | $ git clone https:// | ||
+ | |||
``` | ``` | ||
- | |||
- | <WRAP important > | ||
- | If your kernel version is 5.4 or earlier, please use tag '' | ||
- | </ | ||
==== Install dependencies ==== | ==== Install dependencies ==== |