ChaoningZhang / MobileSAM

This is the official code for MobileSAM project that makes SAM lightweight for mobile applications and beyond!
Apache License 2.0
4.86k stars 505 forks source link

Cannot convert ObjectAwareModel to onnx #143

Open TheConstant3 opened 8 months ago

TheConstant3 commented 8 months ago

I am trying to run code

obj_model_path='./weight/ObjectAwareModel.pt'
ObjAwareModel = ObjectAwareModel(obj_model_path)
ObjAwareModel.export(format='onnx', retina_masks=True)

Error: ONNX: export failure ❌ 9.2s: output 1 (0 [ CPULongType{} ]) of traced region did not have observable data dependence with trace inputs; this probably indicates your program cannot be understood by the tracer.