facebookresearch / mobile-vision

Mobile vision models and code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors when run example

MisakaMikt opened this issue · comments

I installed repo with command python setup.py install successfully. Then use python run_fbnet_v2.py but found errors as following:

image

I try to import mobile_cv but found no class or functions to use. Is there any probloms during installation?
My env: Python3.9 + torch1.9.1 + cuda11.1

image

Could you try running from root dir? eg. python3 -m examples.run_fbnet_v2 as shown in https://github.com/facebookresearch/mobile-vision/blob/main/examples/run_fbnet_v2.py#L8

Could you try running from root dir? eg. python3 -m examples.run_fbnet_v2 as shown in https://github.com/facebookresearch/mobile-vision/blob/main/examples/run_fbnet_v2.py#L8

Thank you. Now this example works. For this example, it seems that I misunderstood the difference between running scripts and running modules in Python.

To use it in my code, I directly copy the mobile_cv folder to my project and add its path to PYTHONPATH.

However, it seems that the previous installation did not work. I'v tried to learn about module installation or package import rules in Python, but didn't find a solution for that. Do you have any suggestions?

In a word, although the installation seems unsuccessful, I can use it now. Thanks a lot.