AlexanderParkin / ChaLearn_liveness_challenge

ChaLearn Face Anti-spoofing Attack Detection Challenge@CVPR2019
MIT License
411 stars 91 forks source link

ModuleNotFoundError: No module named 'models.architectures.mobilenetv2b' #5

Open marcoippolito opened 5 years ago

marcoippolito commented 5 years ago

In Ubuntu 18.04.02 Server Edition, I downloaded all the pre-trained models in data folder:

(python3) marco@pc:~/ChaLearn_liveness_challenge/data$ ls -lah
total 559M
drwxrwxr-x  4 marco marco 4.0K Oct  9 12:03 .
drwxrwxr-x 10 marco marco 4.0K Oct  9 11:54 ..
-rw-r--r--  1 marco marco 167M Mar 14  2019 backbone_ir50_asia.pth
-rw-r--r--  1 marco marco 167M Mar 14  2019 backbone_ir50_ms1m_epoch120.pth
drwxrwxr-x  3 marco marco 4.0K Oct  9 11:01 lists
drwxrwxr-x  9 marco marco 4.0K Oct  9 10:06 opts
-rw-rw-r--  1 marco marco 5.3M Oct  9 11:04 predict_sample.txt
-rw-r--r--  1 marco marco 111M Mar 14  2019 resnet_caffe_afad_lite_g_exp1.pth
-rw-r--r--  1 marco marco 111M Mar 14  2019 resnet_caffe_mcs_orgl.pth

But when executing train.sh :

(python3) marco@pc:~/ChaLearn_liveness_challenge$ ./train.sh 
Traceback (most recent call last):
  File "main.py", line 7, in <module>
    from trainer import Model
  File "/home/marco/ChaLearn_liveness_challenge/trainer.py", line 9, in <module>
    import models, datasets, utils
  File "/home/marco/ChaLearn_liveness_challenge/models/__init__.py", line 1, in <module>
    from .init_model import init_loss, get_model
  File "/home/marco/ChaLearn_liveness_challenge/models/init_model.py", line 1, in 
<module>
    from .architectures import MobileNetV2
  File "/home/marco/ChaLearn_liveness_challenge/models/architectures/__init__.py", line 1, 
in <module>
    from .mobilenetv2b import MobileNetV2
ModuleNotFoundError: No module named 'models.architectures.mobilenetv2b'

How to solve the problem?

Marco

SmokerX commented 5 years ago

Hello, Do you solve this problem?

HaN4Le commented 4 years ago

Help! Do you solve this problem? Thanks

xudou3 commented 4 years ago

just comment these parts, it have never been used

BruceDai003 commented 4 years ago

Please check out the files under models/architectures/, these are the open sourced model architectures. As you can see, only 3 architectures are shared here. In each of the script, there are several similar versions of the same architecture. For example, in resnet_caffe_DLAS.py, there are resnetDLAS_A, resnetDLAS_B, resnetDLAS_C. You can also open models/init_model.py to check out how many possible models are included. But bear in mind that only some of these models are shared, thus you can igore 'from .mobilenetv2b import MobileNetV2'.