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

yolov6s quant problem #1044

Open
4 tasks done
luoshiyong opened this issue May 7, 2024 · 3 comments
Open
4 tasks done

yolov6s quant problem #1044

luoshiyong opened this issue May 7, 2024 · 3 comments
Labels
question Further information is requested

Comments

@luoshiyong
Copy link

Before Asking

  • I have read the README carefully. 我已经仔细阅读了README上的操作指引。

  • I want to train my custom dataset, and I have read the tutorials for training your custom data carefully and organize my dataset correctly; (FYI: We recommand you to apply the config files of xx_finetune.py.) 我想训练自定义数据集,我已经仔细阅读了训练自定义数据的教程,以及按照正确的目录结构存放数据集。(FYI: 我们推荐使用xx_finetune.py等配置文件训练自定义数据集。)

  • I have pulled the latest code of main branch to run again and the problem still existed. 我已经拉取了主分支上最新的代码,重新运行之后,问题仍不能解决。

Search before asking

  • I have searched the YOLOv6 issues and found no similar questions.

Question

i had train custom dataset with yolov6s and when i want to quant yolov6s , i find that yolov6s can not run partial quant for follow reason:
image
i try to ignore the concat amax fusion process and success to get a partial_quant onnx model, but i can not convert it to tensorrt:

Additional

No response

@luoshiyong luoshiyong added the question Further information is requested label May 7, 2024
@luoshiyong
Copy link
Author

i try to ignore the concat amax fusion process and success to get onnx partrial_quant model, but it can not convert to tensorrt model,

@luoshiyong
Copy link
Author

image

@luoshiyong
Copy link
Author

i also want know how to remove the qdq node and get a cache file ,in onnx_utils.py just through"node.output[0] == node_name" so how it works ? "hi, directly build quantized model 'yolov6s_reopt_partial_bs1.sim.onnx' could not achieve the best performance. Please refer this function (https://github.com/meituan/YOLOv6/blob/main/tools/qat/onnx_utils.py) to get a normal float onnx model without QDQ nodes and its calibration file. Then you could build the TRT models with command: trtexec --workspace=1024 --percentile=99 --streams=1 --int8 --fp16 --avgRuns=10 --onnx=yolov6s_reopt_partial_bs1_remove_qdq.onnx --calib=yolov6s_reopt_partial_bs1_remove_qdq_calibration.cache --saveEngine=yolov6s_reopt_partial_bs1.sim.trt."

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

No branches or pull requests

1 participant