{"id":26633452,"url":"https://github.com/docsaidlab/facedetection","last_synced_at":"2025-03-24T15:14:56.529Z","repository":{"id":282218170,"uuid":"947792918","full_name":"DocsaidLab/FaceDetection","owner":"DocsaidLab","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-13T11:18:16.000Z","size":4496,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-13T12:23:29.741Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DocsaidLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-13T09:02:06.000Z","updated_at":"2025-03-13T11:15:38.000Z","dependencies_parsed_at":"2025-03-13T12:33:41.210Z","dependency_job_id":null,"html_url":"https://github.com/DocsaidLab/FaceDetection","commit_stats":null,"previous_names":["docsaidlab/facedetection"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DocsaidLab%2FFaceDetection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DocsaidLab%2FFaceDetection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DocsaidLab%2FFaceDetection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DocsaidLab%2FFaceDetection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DocsaidLab","download_url":"https://codeload.github.com/DocsaidLab/FaceDetection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245294720,"owners_count":20591909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-24T15:14:54.120Z","updated_at":"2025-03-24T15:14:56.522Z","avatar_url":"https://github.com/DocsaidLab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Face Detection Development\n\nThis repository is dedicated to face detection development. It supports training, evaluation, and ONNX model conversion. The first implementation included in this repo is SCRFD.\n\n## Environment setup\n\n### MacOS\n\n- [Pyenv](https://github.com/pyenv/pyenv?tab=readme-ov-file#macos)\n\n- Set up `xz` for `pyenv` to install Python 3.10.16\n\n  ```bash\n  brew install xz\n  echo 'export PYTHON_CONFIGURE_OPTS=\"--with-lzma=$(brew --prefix xz)' \u003e ~/.zshrc\n  exec $SHELL\n  pyenv install 3.10.16\n  pyenv virtualenv 3.10.16 face_detection_dev\n  pyenv activate face_detection_dev\n  ```\n\n- Python packages\n\n  ```bash\n  pip install wheel\n  pip install torch==2.4.1 torchvision # must fix for mps bug, see https://github.com/pytorch/pytorch/issues/142344\n  MAX_JOBS=4 MMCV_WITH_OPS=1 pip install git+https://github.com/open-mmlab/mmcv.git@v2.1.0\n  pip install -r docker/requirements_macos.txt\n  ```\n\n### Linux\n\n- [Pyenv](https://github.com/pyenv/pyenv-installer)\n\n  ```bash\n  pyenv install 3.10.16\n  pyenv virtualenv 3.10.16 face_detection_dev\n  pyenv activate face_detection_dev\n  ```\n\n- Python packages\n\n  ```bash\n  pip install wheel\n  pip install torch==2.5.1 torchvision\n  MAX_JOBS=4 MMCV_WITH_OPS=1 pip install git+https://github.com/open-mmlab/mmcv.git@v2.1.0\n  pip install -r docker/requirements_linux.txt\n  ```\n\n### Docker\n\n- Build Docker image\n\n  ```bash\n  cd docker\n  bash build.sh\n  cd -\n  ```\n\n- Run Docker container\n\n  ```bash\n  bash docker/run_docker.sh $CMD\n  ```\n\n## Train\n\n### prepare dataset\n\nWe use gdown to download the dataset. Please install it first.\n\n```bash\npip install gdown\n```\n\nThen download the dataset and untar it.\n\n```bash\ngdown 1nr5QhnDIeiMApzK_fjYsh0BjD3_OwPgw\ntar cvf face_detection.tar\n```\n\n### without docker\n\n```bash\npython -u train.py ${config}\n```\n\n### with docker\n\n```bash\nbash docker/run_docker.sh python train.py ${config}\n```\n\n## To onnx\n\n```bash\nipython -- torch2onnx.py --config ${config} --ckpt_fpath ${ckpt_fpath} --onnx_fpath ${onnx_fpath}\n```\n\n## Benchmarks\n\n### Widerface Evaluation\n\n```bash\nipython -- benchmark/widerface.py --onnx_fpath ${onnx_fpath}\n```\n\n### NIST Evaluation\n\n```bash\nipython -- benchmark/nist.py --onnx_fpath ${onnx_fpath}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocsaidlab%2Ffacedetection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocsaidlab%2Ffacedetection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocsaidlab%2Ffacedetection/lists"}