你可以到发布页面,下载 deoldify.quant.onnx 文件,之后把它放到models目录即可
我将原有的deoldify模型下载下来并进行了量化导出
import onnx
from onnxruntime.quantization import quantize_dynamic, QuantType
model_fp32 = './deoldify.onnx'
model_quant = './deoldify.quant.onnx'
quantized_model = quantize_dynamic(model_fp32, model_quant, weight_type=QuantType.QUInt8)
If you use any ideas from the papers or code in this repo, please consider citing the authors of deoldify. Lastly, if the ONNX versions helped you in any way, please also consider starring this repository.