You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2023-10-27 14:46:00,547 - modelscope - INFO - PyTorch version 2.0.1+cu118 Found.
2023-10-27 14:46:00,553 - modelscope - INFO - TensorFlow version 2.13.0 Found.
2023-10-27 14:46:00,553 - modelscope - INFO - Loading ast index from /home/xxx/.cache/modelscope/ast_indexer
2023-10-27 14:46:00,938 - modelscope - INFO - No valid ast index found from /home/xxx/.cache/modelscope/ast_indexer, generating ast index from prebuilt!
2023-10-27 14:46:01,512 - modelscope - INFO - Loading done! Current index file version is 1.9.3, with md5 a93e2c6be4dabf3182e4282cfc96b8cb and a total number of 943 components indexed
2023-10-27 14:46:14,581 - modelscope - INFO - Use user-specified model revision: v1.0.2
2023-10-27 14:46:16,539 - modelscope - WARNING - ('PIPELINES', 'face_det_lmk', 'my-custom-pipeline') not found in ast index file
2023-10-27 14:46:16,539 - modelscope - INFO - initiate model from /home/xxx/.cache/modelscope/hub/damo/cv_face_detection_landmark
2023-10-27 14:46:16,539 - modelscope - INFO - initiate model from location /home/xxx/.cache/modelscope/hub/damo/cv_face_detection_landmark.
2023-10-27 14:46:16,543 - modelscope - WARNING - No preprocessor field found in cfg.
2023-10-27 14:46:16,543 - modelscope - WARNING - No val key and type key found in preprocessor domain of configuration.json file.
2023-10-27 14:46:16,543 - modelscope - WARNING - Cannot find available config to build preprocessor at mode inference, current config: {'model_dir': '/home/xxx/.cache/modelscope/hub/damo/cv_face
_detection_landmark'}. trying to build by task and model information.
2023-10-27 14:46:16,543 - modelscope - WARNING - Find task: face_qua, model type: None. Insufficient information to build preprocessor, skip building preprocessor
2023-10-27 14:46:17,463 - modelscope - INFO - Use user-specified model revision: v2.0.5
Traceback (most recent call last):
File "/python3.10/site-packages/modelscope/utils/registry.py", line 212, in build_from_cfg
return obj_cls(**args)
File "/home/xxx/.cache/modelscope/modelscope_modules/cv_face_detection_landmark/ms_wrapper.py", line 58, in __init__
self.det_func = pipeline('face_detection_repo', model='damo/face_detection_model', model_revision='v2.0.5')
File "/python3.10/site-packages/modelscope/pipelines/builder.py", line 137, in pipeline
register_modelhub_repo(model, cfg.get('allow_remote', False))
File "/python3.10/site-packages/modelscope/utils/plugins.py", line 455, in register_modelhub_repo
import_module_from_model_dir(model_dir)
File "/python3.10/site-packages/modelscope/utils/plugins.py", line 400, in import_module_from_model_dir
importlib.import_module(submodule)
File "/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/xxx/.cache/modelscope/modelscope_modules/face_detection_model/data/__init__.py", line 3, in <module>
from . import data_feed
File "/home/xxx/.cache/modelscope/modelscope_modules/face_detection_model/data/data_feed.py", line 20, in <module>
class TrainFeed(data.Dataset):
File "/home/xxx/.cache/modelscope/modelscope_modules/face_detection_model/core/workspace.py", line 138, in register
raise ValueError("Module class already registered: {}".format(
ValueError: Module class already registered: TrainFeed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 6, in <module>
inference = pipeline('face_det_lmk', model='damo/cv_face_detection_landmark', model_revision='v1.0.2')
File "/python3.10/site-packages/modelscope/pipelines/builder.py", line 163, in pipeline
return build_pipeline(cfg, task_name=task)
File "/python3.10/site-packages/modelscope/pipelines/builder.py", line 67, in build_pipeline
return build_from_cfg(
File "/python3.10/site-packages/modelscope/utils/registry.py", line 215, in build_from_cfg
raise type(e)(f'{obj_cls.__name__}: {e}')
ValueError: MyCustomPipeline: Module class already registered: TrainFeed
To Reproduce
What command or script did you run?
from modelscope.models import Model
from modelscope.pipelines import pipeline
input = "https://modelscope.oss-cn-beijing.aliyuncs.com/test/images/mog_face_detection.jpg"
inference = pipeline('face_det_lmk', model='damo/cv_face_detection_landmark', model_revision='v1.0.2')
output = inference(input)
print(output.keys())
Thanks for your error report and we appreciate it a lot.
Checklist
Describe the bug
使用【人脸检测&五官定位模型】
出现以下报错:
To Reproduce
Your Environments (required)
modelscope == 1.9.3
Pipeline related: @Firmament-cyou @wenmengzhou
The text was updated successfully, but these errors were encountered: