forked from charlesxzb/model-zoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
yolov5l.mlir.config.yaml
62 lines (57 loc) · 1.82 KB
/
yolov5l.mlir.config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
name: yolov5l
gops: [16.588894000]
shapes:
- [1, 3, 640, 640]
mlir_transform:
model_transform.py
--model_name $(name)
--model_def $(home)/yolov5l.onnx
--test_input $(root)/dataset/samples/cat.jpg
--input_shapes [$(shape_param)]
--keep_aspect_ratio
--mean 0.0,0.0,0.0
--scale 0.0039216,0.0039216,0.0039216
--pixel_format rgb
--output_names 584,732,880
--test_result $(name)_top_outputs.npz
--mlir $(workdir)/transformed.mlir
mlir_calibration:
run_calibration.py $(workdir)/transformed.mlir
--dataset $(coco2017_mlir_cali_set)
--input_num 100
-o $(workdir)/$(name).lcali_table
BM1684X:
deploy:
- model_deploy.py --mlir $(workdir)/transformed.mlir
--quantize F32
--chip bm1684x
--test_input $(workdir)/$(name)_in_f32.npz
--test_reference $(name)_top_outputs.npz
--tolerance 0.99,0.99
--model $(workdir)/$(name)_bm1684x_f32.bmodel
- model_deploy.py --mlir $(workdir)/transformed.mlir
--quantize INT8
--calibration_table $(workdir)/$(name).lcali_table
--chip bm1684x
--test_reference $(name)_top_outputs.npz
--tolerance 0.95,0.68
--model $(workdir)/$(name)_bm1684x_int8_sym.bmodel
- model_deploy.py --mlir $(workdir)/transformed.mlir
--quantize INT8
--asymmetric
--calibration_table $(workdir)/$(name).lcali_table
--chip bm1684x
--test_reference $(name)_top_outputs.npz
--tolerance 0.90,0.54
--model $(workdir)/$(name)_bm1684x_int8_asym.bmodel
dataset:
imagedir: $(coco2017_val_set)
anno: $(coco2017_anno)/instances_val2017.json
harness:
type: yolo
args:
- name: FP32
bmodel: $(workdir)/$(name)_bm1684x_f32.bmodel
- name: INT8
bmodel: $(workdir)/$(name)_bm1684x_int8_asym.bmodel