Closed wantao1008hh closed 1 year ago
使用的是airockchip/yolov5 master分支 pt使用的是yolov5-v6.2版本,转化后的onnx文件 提取码: 1234 转化的配置如下: model_name: yolov5_yolov7 model_framework: onnx model_file_path: yolov5s-v6_2.onnx RK_device_platform: rk3568 RK_device_id: PR51213100161 dataset: ../../../../../datasets/COCO/coco_dataset_20.txt quantize: True pre_compile: online graph: in_0: shape: 3,640,640 mean_values: 0 std_values: 255 img_type: RGB
configs:
quantized_dtype: asymmetric_quantized-8
quantized_algorithm: normal
optimization_level: 3`
推理结果显示如下:
BOX_THRESH = 0.25
NMS_THRESH = 0.45
已解决,simgod函数问题,这个模型时不带的,所以预测时需要去掉。
已解决,simgod函数问题,这个模型时不带的,所以预测时需要去掉。
请问这个怎么解决的呀
已解决,simgod函数问题,这个模型时不带的,所以预测时需要去掉。
请问这个怎么解决的呀
使用测试的方法有问题,模型转换时没有问题的,测试使用提供的他demo,不要用其他版本测试。
我是使用的他提供修改的yolov7训练和导出的,现在使用这个python_demo时v7出现通道的问题,但是yolov5能成功了。(都是使用的自己的数据集训练的)
转换日志如下
---> Create RKNN object W init: rknn-toolkit2 version: 1.4.0-22dcfef4 ---> Seting RKNN config ---> Loading onnx model ---> Building Analysing : 0%| | 0/Analysing : 100%|███████████████████████████████████████████████| 145/145 [00:00<00:00, 5146.43it/s] Quantizating : 0%| | 0/Quantizating : 1%|▎ | 1/145 [00:Quantizating : 1%|▋ | 2/145 [00:Quantizating : 2%|▉ | 3/145 [00:Quantizating : 3%|█▎ | 4/145 [00:Quantizating : 4%|█▉ | 6/145 [00:Quantizating : 6%|██▋ | 8/145 [00:Quantizating : 7%|███▏ | 10/145 [00:Quantizating : 9%|████▏ | 13/145 [00:Quantizating : 10%|████▊ | 15/145 [00:Quantizating : 12%|█████▌ | 17/145 [00:Quantizating : 14%|██████▍ | 20/145 [00:Quantizating : 17%|███████▊ | 24/145 [00:Quantizating : 19%|█████████ | 28/145 [00:Quantizating : 21%|██████████ | 31/145 [00:Quantizating : 24%|███████████▎ | 35/145 [00:Quantizating : 26%|████████████▎ | 38/145 [00:Quantizating : 28%|█████████████▎ | 41/145 [00:Quantizating : 31%|██████████████▌ | 45/145 [00:Quantizating : 34%|████████████████▏ | 50/145 [00:Quantizating : 38%|█████████████████▊ | 55/145 [00:Quantizating : 41%|███████████████████ | 59/145 [00:Quantizating : 43%|████████████████████▍ | 63/145 [00:Quantizating : 50%|███████████████████████▎ | 72/145 [00:Quantizating : 53%|████████████████████████▉ | 77/145 [00:Quantizating : 58%|███████████████████████████▏ | 84/145 [00:Quantizating : 61%|████████████████████████████▊ | 89/145 [00:Quantizating : 65%|██████████████████████████████▍ | 94/145 [00:Quantizating : 68%|████████████████████████████████ | 99/145 [00:Quantizating : 71%|████████████████████████████████▋ | 103/145 [00:Quantizating : 74%|█████████████████████████████████▉ | 107/145 [00:Quantizating : 77%|███████████████████████████████████▏ | 111/145 [00:Quantizating : 79%|████████████████████████████████████▏ | 114/145 [00:Quantizating : 82%|█████████████████████████████████████▊ | 119/145 [00:Quantizating : 86%|███████████████████████████████████████▎ | 124/145 [00:Quantizating : 88%|████████████████████████████████████████▌ | 128/145 [00:Quantizating : 92%|██████████████████████████████████████████▏ | 133/145 [00:Quantizating : 96%|████████████████████████████████████████████ | 139/145 [00:Quantizating : 100%|██████████████████████████████████████████████| 145/145 [00:Quantizating : 100%|██████████████████████████████████████████████| 145/145 [00:05<00:00, 24.87it/s] W build: The default input dtype of 'images' is changed from 'float32' to 'int8' in rknn model for performance! Please take care of this change when deploy rknn model with Runtime API! W build: The default output dtype of 'output' is changed from 'float32' to 'int8' in rknn model for performance! Please take care of this change when deploy rknn model with Runtime API! W build: The default output dtype of '332' is changed from 'float32' to 'int8' in rknn model for performance! Please take care of this change when deploy rknn model with Runtime API! W build: The default output dtype of '334' is changed from 'float32' to 'int8' in rknn model for performance! Please take care of this change when deploy rknn model with Runtime API! ---> Export RKNN model WARNING: RK3568 model needn't pre_compile. Ignore! Convert Done!
============================== Compare_convert_dist_via_python sample: 1 ---> Init_rknn_runtime I NPUTransfer: Starting NPU Transfer Client, Transfer version 2.1.0 (b5861e7@2020-11-23T11:50:36) D RKNNAPI: ============================================== D RKNNAPI: RKNN VERSION: D RKNNAPI: API: 1.4.0 (bb6dac9 build: 2022-08-29 16:17:01) D RKNNAPI: DRV: rknn_server: 1.4.0 (bb6dac9 build: 2022-08-29 16:16:39) D RKNNAPI: DRV: rknnrt: 1.4.0 (a10f100eb@2022-09-09T09:06:40) D RKNNAPI: ============================================== ---> compute onnx result For example iter 1/1 rknn(asymmetric_quantized-8) VS onnx cos_similarity: output-0 : 0.997616171836853 output-1 : 0.9967880249023438 output-2 : 0.995629072189331
============================== Compare_convert_dist_via_Capi looptime: 100 api_type: normal sample: 1
Device: RK3568 adb server version (40) doesn't match this client (39); killing...
/data/capi_test//scaling_frequency.sh[235]: [: ==: missing second argument Seting Failed NPU: seting frequency /data/capi_test//scaling_frequency.sh[235]: can't create /sys/class/devfreq/fde40000.npu/governor: Permission denied /data/capi_test//scaling_frequency.sh[235]: can't create /sys/class/devfreq/fde40000.npu/userspace/set_freq: No such file or directory try set 1000000000 query 1000000000 Seting Success DDR: seting frequency /data/capi_test//scaling_frequency.sh[235]: can't create /sys/class/devfreq/dmc/governor: Permission denied /data/capi_test//scaling_frequency.sh[235]: can't create /sys/class/devfreq/dmc/userspace/set_freq: No such file or directory try set 1560000000 query 1332000000 Seting Failed /data/capi_test//scaling_frequency.sh[239]: can't create ./freq_set_status: Read-only file system ---> clear and create result store dir ---> push input ./tmp/in_0.npy: 1 file pushed. 24.6 MB/s (1228928 bytes in 0.048s) rknn_api/rknnrt version: 1.4.0 (a10f100eb@2022-09-09T09:06:40), driver version: 0.3.0 total weight size: 7312768, total internal size: 7782400 total dma used size: 21548552 model input num: 1, output num: 3 input tensors: index=0, name=images, n_dims=4, dims=[1, 640, 640, 3], n_elems=1228800, size=1228800, w_stride = 640, size_with_stride=1228800, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003922 output tensors: index=0, name=output, n_dims=4, dims=[1, 255, 80, 80], n_elems=1632000, size=1632000, w_stride = 0, size_with_stride=1632000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003919 index=1, name=332, n_dims=4, dims=[1, 255, 40, 40], n_elems=408000, size=408000, w_stride = 0, size_with_stride=408000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003920 index=2, name=334, n_dims=4, dims=[1, 255, 20, 20], n_elems=102000, size=102000, w_stride = 0, size_with_stride=102000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003920 custom string: Loading in_0.npy npy data type:uint8 Begin perf ... Loop count 100 Avg input set time = 1.071 Avg rknn run time = 65.520 Avg output get time = 25.502 /data/capi_test/capi_record.txt: 1 fil...pulled. 0.2 MB/s (186 bytes in 0.001s) /data/capi_test/output_0.npy: 1 file p...d. 31.4 MB/s (6528080 bytes in 0.198s) /data/capi_test/output_1.npy: 1 file p...d. 33.6 MB/s (1632080 bytes in 0.046s) /data/capi_test/output_2.npy: 1 file p...ed. 31.9 MB/s (408080 bytes in 0.012s) ---> time_info: input_set: 1.07093 ms run: 65.51959 ms output_get: 25.50176 ms ---> compute onnx result For example iter 1/1 rknn(asymmetric_quantized-8) VS onnx cos_similarity: output-0 : 0.997616171836853 output-1 : 0.9967880249023438 output-2 : 0.995629072189331