Results 44 comments of xxddccaa

@phoenixliu666 @chennankuan 已经在微信给百度负责这块的人 @cuicheng01 提供了详细的过程文件和描述,这的确是一个很大的BUG,如果各位有在端侧执行推理的需求,可能需要耐心等待bug修复或者换一个框架了,bug修复后 @cuicheng01 应该会第一时间回复此条issues。

问题的确出在export_model上,百度infer的模型导出到自身推理模型上出了问题。

你好,我把文件传百度云了,他们都是一一对应的: 链接:https://pan.baidu.com/s/1sscJwEJVflt06I-5fPNKBg?pwd=y9v3 提取码:y9v3 ![image](https://user-images.githubusercontent.com/25652821/182022554-33d46921-533c-4e2b-a8f4-b8912410d24d.png) 执行paddlecls ,使用latest.pdparams 、inference.pdiparams、onnx出来的数值都有或多或少的区别。

今天有了新的对比发现,把图片保存为bin后利用不同模型处理多标签任务,看输出的最大值判定模型推理是否相同,我发现: (1)运行onnx的结果最大数值是 0.96299744 (2)运行paddleclas自带的推理的功能(/deploy/python/predict_cls.py)的结果最大数值是 0.9629971。 万分位以上的差别都是可以接受的,所以我觉得paddle2onnx还是OK的。 (3)运行paddleclas自带的infer推理(tools/infer.py)的结果最大数值是0.94861。那么问题就出在paddle的动态模型转到paddle的推理模型上。 我在paddlecls的项目里也提一下这个问题,希望能得到解决。

是的。是这个情况。 我也认同 确实是deploy/python/predict_cls.py和tools/infer.py的预测结果差异问题。 不知道可以提给谁解决,有心支持国产但是我好像遇到了自己不能解决的阻碍。

我提一下我的使用过程,/mnt/c/Users/dong.xie/Desktop/workcode/workplace/PaddleClas/test.bin就是那张(3,224,224)的numpy变量。 ``` import paddle.nn.functional as F images = np.fromfile("/mnt/c/Users/dong.xie/Desktop/workcode/workplace/PaddleClas/test.bin", dtype=np.float32).reshape(3, 224, 224) images = np.expand_dims(images, 0) import onnxruntime as ort session = ort.InferenceSession( r'inference/inference.onnx') outputs = session.run(None, {'x': images}) print("onnx",...

https://github.com/xddun/stable-diffusion-webui-nsfw-model-xdkevin/tree/master/scripts onnx model in here, have fun.

> https://github.com/xddun/stable-diffusion-webui-nsfw-model-xdkevin/tree/master/scripts > > onnx model in here, have fun. follow this way: https://github.com/xddun/stable-diffusion-webui-nsfw-model-xdkevin/blob/master/scripts/singletext.py

CUDA11.6跑OCR应该是没问题,我打包了一个镜像应用可以直接调用OCR,见:https://qq742971636.blog.csdn.net/article/details/135109278

it work for me : ``` def roop_api(_: gr.Blocks, app: FastAPI): @app.post("/roop/image") async def roop_image( source_image: str = Body("", title="source face image"), target_image: str = Body("", title="target image"), face_index: list[int]...