doc: revise step-by-step

This commit is contained in:
EricChunYi 2022-04-07 15:58:59 +08:00
parent 7a2479fc0d
commit 48e6d06e5e

View File

@ -279,7 +279,7 @@ print("\nNpu performance evaluation result:\n" + str(eval_result))
``` ```
### Step 5-6: quantize the onnx model ### Step 5-6: quantize the onnx model
We [sampled 3 images from Cityscapes dataset](?) (3 images) as quantization data. To test our quantized model: We [sampled 3 images from Cityscapes dataset](https://www.kneron.com/tw/support/education-center/?folder=MMLab/MMSegmentationKN/&download=41) (3 images) as quantization data. To test our quantized model:
1. Download the zip file 1. Download the zip file
2. Extract the zip file as a folder named `cityscapes_minitest` 2. Extract the zip file as a folder named `cityscapes_minitest`
3. Put the `cityscapes_minitest` into docker mounted folder (the path in docker container should be `/data1/cityscapes_minitest`) 3. Put the `cityscapes_minitest` into docker mounted folder (the path in docker container should be `/data1/cityscapes_minitest`)
@ -298,7 +298,7 @@ for (dirpath, dirnames, filenames) in walk("/data1/cityscapes_minitest"):
image = Image.open(fullpath) image = Image.open(fullpath)
image = image.convert("RGB") image = image.convert("RGB")
image = Image.fromarray(np.array(image)[...,::-1]) image = Image.fromarray(np.array(image)[...,::-1])
img_data = np.array(image.resize((640, 640), Image.BILINEAR)) / 256 - 0.5 img_data = np.array(image.resize((1024, 512), Image.BILINEAR)) / 256 - 0.5
print(fullpath) print(fullpath)
img_list.append(img_data) img_list.append(img_data)
``` ```