minivision-ai / Silent-Face-Anti-Spoofing

静默活体检测(Silent-Face-Anti-Spoofing)
Apache License 2.0
1.36k stars 453 forks source link

训练数据集介绍 #125

Open Cassieyy opened 1 year ago

Cassieyy commented 1 year ago

您好,想请教下用于训练两个.pth权重的训练集大概是什么样的。比如数据量,采样场景以及正负样本的分布等等。谢谢!

Cassieyy commented 1 year ago

试了下 modelscope 的静默人脸活体检测模型-炫彩,在对真人识别的准确率上,比较下来还是本 repo 的准确率更高一些。

qwertyz15 commented 10 months ago

你能给我提供你所说的 github 仓库吗?

Cassieyy commented 10 months ago

https://modelscope.cn/models/damo/cv_manual_face-liveness_flxc/summary

qwertyz15 commented 10 months ago

能提供一下requirements.txt吗?因为我面临一些问题。

Cassieyy commented 10 months ago

这个repo 应该只需要装 modelscope,装完再看有什么报错,再针对性地解决环境问题。

qwertyz15 commented 10 months ago

我遇到了这个问题,你能帮我解决这个问题吗?

>>> from modelscope.pipelines import pipeline
2024-01-18 14:48:47,338 - modelscope - INFO - PyTorch version 1.13.0+cu117 Found.
2024-01-18 14:48:47,340 - modelscope - INFO - TensorFlow version 2.13.1 Found.
2024-01-18 14:48:47,340 - modelscope - INFO - Loading ast index from /home/dev/.cache/modelscope/ast_indexer
2024-01-18 14:48:47,419 - modelscope - INFO - Updating the files for the changes of local files, first time updating will take longer time! Please wait till updating done!
2024-01-18 14:48:47,419 - modelscope - INFO - AST-Scanning the path "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope" with the following sub folders ['models', 'metrics', 'pipelines', 'preprocessors', 'trainers', 'msdatasets', 'exporters']
2024-01-18 14:48:47,461 - modelscope - INFO - Scanning done! A number of 1 components indexed or updated! Time consumed 0.04243946075439453s
2024-01-18 14:48:47,481 - modelscope - INFO - Loading done! Current index file version is 1.10.0, with md5 cec82730a5bd3d7cf765d62729bfc3ad and a total number of 946 components indexed
>>> from modelscope.utils.constant import Tasks
>>> 
>>> 
>>> face_liveness_xc = pipeline(Tasks.face_liveness, 'damo/cv_manual_face-liveness_flxc')
2024-01-18 14:49:19,630 - modelscope - WARNING - Model revision not specified, use revision: v1.0
2024-01-18 14:49:20.563181: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-01-18 14:49:22,384 - modelscope - INFO - initiate model from /home/dev/.cache/modelscope/hub/damo/cv_manual_face-liveness_flxc
2024-01-18 14:49:22,384 - modelscope - INFO - initiate model from location /home/dev/.cache/modelscope/hub/damo/cv_manual_face-liveness_flxc.
2024-01-18 14:49:22,386 - modelscope - WARNING - No preprocessor field found in cfg.
2024-01-18 14:49:22,386 - modelscope - WARNING - No val key and type key found in preprocessor domain of configuration.json file.
2024-01-18 14:49:22,386 - modelscope - WARNING - Cannot find available config to build preprocessor at mode inference, current config: {'model_dir': '/home/dev/.cache/modelscope/hub/damo/cv_manual_face-liveness_flxc'}. trying to build by task and model information.
2024-01-18 14:49:22,386 - modelscope - WARNING - Find task: face-liveness, model type: None. Insufficient information to build preprocessor, skip building preprocessor
2024-01-18 14:49:36,229 - modelscope - WARNING - Model revision not specified, use revision: v1.1
2024-01-18 14:49:37,053 - modelscope - INFO - initiate model from /home/dev/.cache/modelscope/hub/damo/cv_ddsar_face-detection_iclr23-damofd
2024-01-18 14:49:37,053 - modelscope - INFO - initiate model from location /home/dev/.cache/modelscope/hub/damo/cv_ddsar_face-detection_iclr23-damofd.
2024-01-18 14:49:37,053 - modelscope - INFO - initialize model from /home/dev/.cache/modelscope/hub/damo/cv_ddsar_face-detection_iclr23-damofd
Traceback (most recent call last):
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/utils/registry.py", line 210, in build_from_cfg
    return obj_cls._instantiate(**args)
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/models/base/base_model.py", line 67, in _instantiate
    return cls(**kwargs)
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/models/cv/face_detection/scrfd/damofd_detect.py", line 31, in __init__
    super().__init__(model_dir, **kwargs)
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/models/cv/face_detection/scrfd/scrfd_detect.py", line 35, in __init__
    from mmcv.parallel import MMDataParallel
ModuleNotFoundError: No module named 'mmcv.parallel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/utils/registry.py", line 212, in build_from_cfg
    return obj_cls(**args)
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/pipelines/cv/face_detection_pipeline.py", line 36, in __init__
    super().__init__(model=model, **kwargs)
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/pipelines/base.py", line 99, in __init__
    self.model = self.initiate_single_model(model)
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/pipelines/base.py", line 53, in initiate_single_model
    return Model.from_pretrained(
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/models/base/base_model.py", line 183, in from_pretrained
    model = build_model(model_cfg, task_name=task_name)
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/models/builder.py", line 35, in build_model
    model = build_from_cfg(
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/utils/registry.py", line 215, in build_from_cfg
    raise type(e)(f'{obj_cls.__name__}: {e}')
ModuleNotFoundError: DamoFdDetect: No module named 'mmcv.parallel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/utils/registry.py", line 212, in build_from_cfg
    return obj_cls(**args)
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/pipelines/cv/face_liveness_xc_pipeline.py", line 46, in __init__
    super().__init__(model=model, **kwargs)
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/pipelines/cv/face_processing_base_pipeline.py", line 36, in __init__
    self.face_detection = pipeline(
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/pipelines/builder.py", line 170, in pipeline
    return build_pipeline(cfg, task_name=task)
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/pipelines/builder.py", line 65, in build_pipeline
    return build_from_cfg(
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/utils/registry.py", line 215, in build_from_cfg
    raise type(e)(f'{obj_cls.__name__}: {e}')
ModuleNotFoundError: FaceDetectionPipeline: DamoFdDetect: No module named 'mmcv.parallel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/pipelines/builder.py", line 170, in pipeline
    return build_pipeline(cfg, task_name=task)
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/pipelines/builder.py", line 65, in build_pipeline
    return build_from_cfg(
  File "/home/dev/Documents/Envs/yolov8/lib/python3.8/site-packages/modelscope/utils/registry.py", line 215, in build_from_cfg
    raise type(e)(f'{obj_cls.__name__}: {e}')
ModuleNotFoundError: FaceLivenessXcPipeline: FaceDetectionPipeline: DamoFdDetect: No module named 'mmcv.parallel'
>>>