vietanhdev / samexporter

Export Segment Anything Models to ONNX
https://pypi.org/project/samexporter/
MIT License
239 stars 29 forks source link

No module named 'samexporter' #6

Closed morestart closed 4 months ago

morestart commented 1 year ago
python.exe: Error while finding module specification for 'samexporter.export_encoder' (ModuleNotFoundError: No module named 'samexporter')
python.exe: Error while finding module specification for 'samexporter.export_decoder' (ModuleNotFoundError: No module named 'samexporter')
morestart commented 1 year ago

I used inference.py to load segment_anything_vit_h_encoder_quant.onnx,but I received an error:

onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Invalid rank for input: x Got: 3 Expected: 4 Please fix either the inputs or the model.

satyajandhyala commented 10 months ago

__init__.py file is missing under samexporter subfolder. Create an empty file then it works fine.

vietanhdev commented 10 months ago

@satyajandhyala Could you create a pull request to fix it? Thank you very much!

Greg7000 commented 4 months ago

Please note this issue occurs with PyPi installation for version 0.2. Consider providing new release with this fix.

The installation from source for the same version works

vietanhdev commented 4 months ago

Published v0.3.0 for this issue. Thank @Greg7000 !