Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTMPose Quantization using NCNN #2203

Closed
moonsh opened this issue Apr 11, 2023 · 2 comments
Closed

RTMPose Quantization using NCNN #2203

moonsh opened this issue Apr 11, 2023 · 2 comments

Comments

@moonsh
Copy link

moonsh commented Apr 11, 2023

I wanted to reduce the size of rtmpose-tiny model through NCNN quantization.

Converting to NCNN without quantization is fine but when the quantization function is on I got an error like below.
Quantization for RTMPose is not supported yet?

Error

loading annotations into memory...
Done (t=0.23s)
creating index...
index created!
2023-04-11:14:10:34 - root - ERROR - 0
Traceback (most recent call last):
File "/mmdeploy/mmdeploy/utils/utils.py", line 41, in target_wrapper
result = target(*args, **kwargs)
File "/mmdeploy/tools/onnx2ncnn_quant_table.py", line 47, in get_table
input_tensor = input_data[0]
KeyError: 0
04/11 14:10:34 - mmengine - ERROR - tools/deploy.py - create_process - 82 - ncnn quant table failed.

And I used this command for deployment.

python tools/deploy.py configs/mmpose/pose-detection_simcc_ncnn-fp16_static-256x192.py ../mmpose/projects/rtmpose/rtmpose/body_2d_keypoint/rtmpose-t_8xb256-420e_coco-256x192.py ../mmpose/rtmpose-tiny_simcc-coco_pt-aic-coco_420e-256x192.pth demo/resources/human-pose.jpg --work-dir test3 --device cpu --quant

@Tau-J
Copy link
Collaborator

Tau-J commented Apr 13, 2023

The quantization is not supported.

@Tau-J Tau-J closed this as completed Apr 13, 2023
@irexyc
Copy link
Contributor

irexyc commented Apr 21, 2023

@moonsh

Please modify ncnn code like this Tencent/ncnn#4658 and try your command again

For custom quant image, I am fixing the dataloader and will update code soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants