apple / ml-cvnets

CVNets: A library for training computer vision networks
https://apple.github.io/ml-cvnets
Other
1.76k stars 225 forks source link

cannot run conversion example #78

Closed darwinharianto closed 1 year ago

darwinharianto commented 1 year ago

Calling conversion with

export CONFIG_FILE="https://docs-assets.developer.apple.com/ml-research/models/cvnets-v2/classification/mobilevitv2/imagenet1k/256x256/mobilevitv2-1.0.yaml"
export MODEL_WEIGHTS="https://docs-assets.developer.apple.com/ml-research/models/cvnets-v2/classification/mobilevitv2/imagenet1k/256x256/mobilevitv2-1.0.pt"
cvnets-convert --common.config-file $CONFIG_FILE --common.results-loc coreml_models_cls --model.classification.pretrained $MODEL_WEIGHTS  --conversion.coreml-extn mlmodel

throws an error ModuleNotFoundError: No module named 'main_conversion'

farzadab commented 1 year ago

The main_conversion.py does exist here: https://github.com/apple/ml-cvnets/blob/main/main_conversion.py Are you running that command from the root of the repo? If yes, try setting export PYTHONPATH=..

darwinharianto commented 1 year ago

ah yes, I ran it from the root of the repo. that export PYTHONPATH=. works! thanks!

where was I supposed to run the command from?