{"id":37641236,"url":"https://github.com/soubhiksanyal/now_evaluation","last_synced_at":"2026-01-16T11:17:54.650Z","repository":{"id":40547769,"uuid":"338029717","full_name":"soubhiksanyal/now_evaluation","owner":"soubhiksanyal","description":"This is the official repository for evaluation on the NoW Benchmark Dataset. The goal of the NoW benchmark is to introduce a standard evaluation metric to measure the accuracy and robustness of 3D face reconstruction methods from a single image under variations in viewing angle, lighting, and common occlusions.","archived":false,"fork":false,"pushed_at":"2025-02-23T21:31:12.000Z","size":592,"stargazers_count":109,"open_issues_count":1,"forks_count":16,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-23T22:26:49.806Z","etag":null,"topics":["2d-3d","3d-data","3d-face-alignment","3d-landmarks","3d-mesh","3d-reconstruction","benchmark-datasets","computer-vision","face","face-alignment","face-reconstruction","face-reconstruction-challenge","flame","flame-model","now-evaluation","python","python3","single-image-reconstruction","triplet-loss"],"latest_commit_sha":null,"homepage":"https://now.is.tue.mpg.de/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soubhiksanyal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-02-11T12:59:28.000Z","updated_at":"2025-02-23T21:31:17.000Z","dependencies_parsed_at":"2025-02-23T22:22:55.122Z","dependency_job_id":"ce4168ec-3929-4e8c-ae9c-12cc64b057ef","html_url":"https://github.com/soubhiksanyal/now_evaluation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/soubhiksanyal/now_evaluation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soubhiksanyal%2Fnow_evaluation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soubhiksanyal%2Fnow_evaluation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soubhiksanyal%2Fnow_evaluation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soubhiksanyal%2Fnow_evaluation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soubhiksanyal","download_url":"https://codeload.github.com/soubhiksanyal/now_evaluation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soubhiksanyal%2Fnow_evaluation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["2d-3d","3d-data","3d-face-alignment","3d-landmarks","3d-mesh","3d-reconstruction","benchmark-datasets","computer-vision","face","face-alignment","face-reconstruction","face-reconstruction-challenge","flame","flame-model","now-evaluation","python","python3","single-image-reconstruction","triplet-loss"],"created_at":"2026-01-16T11:17:54.580Z","updated_at":"2026-01-16T11:17:54.644Z","avatar_url":"https://github.com/soubhiksanyal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\nThe original README continues below:\n\n# NoW Evaluation\n\nThis is the official repository for evaluation on the [NoW Benchmark](https://now.is.tue.mpg.de). The goal of the NoW benchmark is to introduce a standard evaluation metric to measure the accuracy and robustness of 3D face reconstruction methods from a single image under variations in viewing angle, lighting, and common occlusions. \n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"content_now_dataset.png\"\u003e\n\u003c/p\u003e\n\n## Evaluation metric\n\nGiven a single monocular image, the challenge consists of reconstructing a 3D face. Since the predicted meshes occur in different local coordinate systems, the reconstructed 3D mesh is rigidly aligned (rotation, translation, and scaling) to the scan using a set of corresponding landmarks between the prediction and the scan. We further perform a rigid alignment based on the scan-to-mesh distance (which is the absolute distance between each scan vertex and the closest point in the mesh surface) between the ground truth scan, and the reconstructed mesh using the landmarks alignment as initialization. For more details, see the [NoW Website](https://now.is.tue.mpg.de) or the [RingNet paper](https://ps.is.tuebingen.mpg.de/uploads_file/attachment/attachment/509/paper_camera_ready.pdf).\n\n```\nLearning to Regress 3D Face Shape and Expression from an Image without 3D Supervision\nSoubhik Sanyal, Timo Bolkart, Haiwen Feng, Michael J. Black\nComputer Vision and Pattern Recognition (CVPR) 2019\n```\n\n## Clone the repository \n```\ngit clone https://github.com/soubhiksanyal/now_evaluation.git\n```\n\n## **New:** Easy setup with Docker, and speed-up with parallel processing\n\nIt is now easier to setup and run the NoW evaluation script with Docker. It also processes your predictions faster thanks to using multiprocessing.\n\n### Setup\n\nInstalling using docker automates all of the external library, etc., setup outlined in the original readme setup sections below.\n\nTo run with Docker, just build the docker image:\n\n```bash\ndocker build -t noweval .\n```\n\nDownload all components of the NoW dataset to a folder like this (see below sections for where to download the dataset from):\n\n```bash\n/datadir/NoW_Evaluation/dataset\n├── imagepathsvalidation.txt\n├── NoW_Dataset\n├── scans\n├── scans_lmks_onlypp\n└── test\n```\n\n### Evaluating with the Docker image\n\nMake your predictions on the validation set, and put them in e.g. `/path/with/your/predictions`\n\nNow just run:\n\n```bash\ndocker run --ipc host --rm -v /datadir/NoW_Evaluation/dataset:/dataset -v /path/with/your/predictions:/preds noweval\n```\n\nThe results will be placed in `/path/with/your/predictions/results/`\n\n### Parallelism speed-up\n\nBy default, the code will now use `num_cpu_cores * 4` processes to process your data in parallel. To switch back to using a single process, set `--nproc 1`:\n\n```bash\n# If using Docker\ndocker run --ipc host --rm -v /datadir/NoW_Evaluation/dataset:/dataset -v /path/with/your/predictions:/preds noweval --nproc 1\n# If running in Python\npython compute_error.py --nproc 1\n```\n\n## Installation (original)\n\nPlease install the virtual environment\n\n```\nmkdir \u003cyour_home_dir\u003e/.virtualenvs\npython3 -m venv \u003cyour_home_dir\u003e/.virtualenvs/now_evaluation\nsource \u003cyour_home_dir\u003e/.virtualenvs/now_evaluation/bin/activate\n```\n\nMake sure your pip version is up-to-date:\n```\npip install -U pip\n```\n\nInstall the requirements by using:\n\n```\npip install -r requirements.txt\n```\n\nInstall mesh processing libraries from [MPI-IS/mesh](https://github.com/MPI-IS/mesh) within the virtual environment.\n\n### Installing Scan2Mesh distance:\n\nClone the [flame-fitting](https://github.com/Rubikplayer/flame-fitting) repository and copy the required folders by the following comments\n\n```\ngit clone https://github.com/Rubikplayer/flame-fitting.git\ncp -r flame-fitting/smpl_webuser now_evaluation/smpl_webuser\ncp -r flame-fitting/sbody now_evaluation/sbody\n```\n\nClone [Eigen](http://eigen.tuxfamily.org/index.php?title=Main_Page), checkout v3.4.0, and copy the it to the following folder \n\n```\ngit clone https://gitlab.com/libeigen/eigen.git\ncd eigen\ngit checkout 3.4.0\ncd ..\ncp -r eigen now_evaluation/sbody/alignment/mesh_distance/eigen\n```\n\nEdit the file 'now_evaluation/sbody/alignment/mesh_distance/setup.py' to set EIGEN_DIR to the location of Eigen. Then compile the code by following command\n```\ncd now_evaluation/sbody/alignment/mesh_distance\nmake\n```\n\nThe installation of Scan2Mesh is followed by the codebase provided by [flame-fitting](https://github.com/Rubikplayer/flame-fitting).\nPlease check that repository for more detailed instructions on Scan2Mesh installation.\n\n## Evaluation\n\nDownload the NoW Dataset and the validation set scans from the [NoW website](https://now.is.tue.mpg.de/download.php), and predict 3D faces for all validation images.\n\n#### Check data setup\n\nBefore running the now evaluation, \n\n***1) check that the predicted meshes can be successfuly loaded by the used mesh loader by running***\n```\npython check_predictions.py \u003cpredicted_mesh_path\u003e\n```\nRunning this loads the `\u003cpredicted_mesh_path\u003e` mesh and exports it to `./predicted_mesh_export.obj`. Please check if this file can be loaded by e.g. [MeshLab](https://www.meshlab.net/) or any other mesh loader, and that the resulting mesh looks like the input mesh.\n\n***2) check that the landmarks for the predicted meshes are correct by running***\n```\npython check_predictions.py \u003cpredicted_mesh_path\u003e \u003cpredicted_mesh_landmark_path\u003e \u003cgt_scan_path\u003e \u003cgt_lmk_path\u003e \n```\nRunning this loads the `\u003cpredicted_mesh_path\u003e` mesh, rigidly aligns it with the the scan `\u003cgt_scan_path\u003e`, and outputs the aligned mesh to `./predicted_mesh_aligned.obj`, and the cropped scan to `./cropped_scan.obj`. Please check if the output mesh and scan are rigidly aligned by jointly opening them in e.g. [MeshLab](https://www.meshlab.net/).\n\n#### Error computation\n\nTo run the now evaluation on the validation set, run\n```\npython compute_error.py\n```\n\nThe function in `metric_computation()` in `compute_error.py` is used to compute the error metric. In the most common setting you can run `python compute_error.py --predicted_mesh_folder \u003cpredicted_mesh_folder\u003e --dataset_folder \u003cdataset_folder\u003e`. For more options please see `compute_error.py`\n\nThe predicted_mesh_folder should in a similar structure as mentioned in the [RingNet](https://now.is.tue.mpg.de/download.php) website.\n\nPrior to computing the point-to-surface distance, a rigid alignment between each predicted mesh and the scan is computed. The rigid alignment computation requires for each predicted mesh a file with following 7 landmarks:\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"landmarks_7_annotated.png\" width=\"50%\"\u003e\n\u003c/p\u003e\n\n\n#### Visualization\n\nVisualization of the reconstruction error is best done with a cumulative error curve. To generate a cumulative error plot, call `generating_cumulative_error_plots()` in the `cumulative_errors.py` with the list of output files and the corresponding list method names. \n\n**Note that ground truth scans are only provided for the validation set. In order to participate in the NoW challenge, please submit the test set predictions to ringnet@tue.mpg.de as described [here](https://now.is.tue.mpg.de/index.html)**.\n\n#### Known issues\n\nThe used [mesh loader](https://github.com/MPI-IS/mesh) is unable to load OBJ files with vertex colors appended to the vertices. I.e. if the OBJ contains lines of the following format `v vx vy vz cr cg cb\\n`, export the meshes without vertex colors.\n\n## License\n\nBy using the NoW dataset or code, you acknowledge that you have read the [license terms](https://now.is.tue.mpg.de/license.html), understand them, and agree to be bound by them. If you do not agree with these terms and conditions, you must not use the code.\n\n## Citing\n\nThis codebase was developed for evaluation of the [RingNet project](https://github.com/soubhiksanyal/RingNet). When using the code or NoW evaluation results in a scientific publication, please cite\n```\n@inproceedings{RingNet:CVPR:2019,\ntitle = {Learning to Regress 3D Face Shape and Expression from an Image without 3D Supervision},\nauthor = {Sanyal, Soubhik and Bolkart, Timo and Feng, Haiwen and Black, Michael},\nbooktitle = {Proceedings IEEE Conf. on Computer Vision and Pattern Recognition (CVPR)},\nmonth = jun,\nyear = {2019},\nmonth_numeric = {6}\n}\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoubhiksanyal%2Fnow_evaluation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoubhiksanyal%2Fnow_evaluation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoubhiksanyal%2Fnow_evaluation/lists"}