caizhongang / SMPLer-X

Official Code for "SMPLer-X: Scaling Up Expressive Human Pose and Shape Estimation"
https://caizhongang.github.io/projects/SMPLer-X/
Other
1.01k stars 73 forks source link

Error when running "init_detector" in inference #35

Closed JiahaoPlus closed 11 months ago

JiahaoPlus commented 11 months ago

Thanks for the nice work.

I followed the installation instructions but ran into an error when running inference. The error happened when init_detector, which then used mmdet, mmcv, and importlib.

Do you have any idea why will this happen? Is that a package version issue?

Traceback (most recent call last):
  File "inference.py", line 188, in <module>
    main()
  File "inference.py", line 71, in main
    model = init_detector(config_file, checkpoint_file, device='cuda:0')  # or device='cuda:0'
  File "/home/anaconda3/envs/smplerx/lib/python3.8/site-packages/mmdet/apis/inference.py", line 33, in init_detector
    config = mmcv.Config.fromfile(config)
  File "/home/anaconda3/envs/smplerx/lib/python3.8/site-packages/mmcv/utils/config.py", line 340, in fromfile
    cfg_dict, cfg_text = Config._file2dict(filename,
  File "/home/anaconda3/envs/smplerx/lib/python3.8/site-packages/mmcv/utils/config.py", line 208, in _file2dict
    mod = import_module(temp_module_name)
  File "/home/anaconda3/envs/smplerx/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/tmp/tmpngpqtodm/tmpti3mss0b.py", line 1, in <module>
NameError: name 'false' is not defined
Exception ignored in: <function _TemporaryFileCloser.__del__ at 0x7fcdc5affa60>
Traceback (most recent call last):
  File "/home/anaconda3/envs/smplerx/lib/python3.8/tempfile.py", line 440, in __del__
    self.close()
  File "/home/anaconda3/envs/smplerx/lib/python3.8/tempfile.py", line 436, in close
    unlink(self.name)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpngpqtodm/tmpti3mss0b.py'
JiahaoPlus commented 11 months ago

I have seen issue 4. However, I am using the recommended versions for the packages:

The error is still there.

JiahaoPlus commented 11 months ago

Sorry, it turned out to be a broken mmdet_faster_rcnn_r50_fpn_coco.py on my side. Re-download from here and modify some files following FAQ solved my problem.