{"id":13958383,"url":"https://github.com/wmcnally/evopose2d","last_synced_at":"2025-07-20T23:31:19.096Z","repository":{"id":118302449,"uuid":"308470817","full_name":"wmcnally/evopose2d","owner":"wmcnally","description":"EvoPose2D is a two-stage human pose estimation model that was designed using neuroevolution. It achieves state-of-the-art accuracy on COCO.","archived":false,"fork":false,"pushed_at":"2021-10-20T11:21:06.000Z","size":244,"stargazers_count":82,"open_issues_count":5,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-09T13:18:44.385Z","etag":null,"topics":["deep-learning","human-pose-estimation","pose-estimation","tensorflow","tensorflow2","tpu"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wmcnally.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}},"created_at":"2020-10-29T23:07:09.000Z","updated_at":"2024-04-10T20:14:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"e31893ea-7a54-4dfe-94b1-60462a1c9244","html_url":"https://github.com/wmcnally/evopose2d","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmcnally%2Fevopose2d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmcnally%2Fevopose2d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmcnally%2Fevopose2d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmcnally%2Fevopose2d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wmcnally","download_url":"https://codeload.github.com/wmcnally/evopose2d/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226845009,"owners_count":17691140,"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":["deep-learning","human-pose-estimation","pose-estimation","tensorflow","tensorflow2","tpu"],"created_at":"2024-08-08T13:01:31.235Z","updated_at":"2024-11-28T01:31:57.310Z","avatar_url":"https://github.com/wmcnally.png","language":"Python","funding_links":[],"categories":["人像\\姿势\\3D人脸"],"sub_categories":["网络服务_其他"],"readme":"# EvoPose2D\nSource code for EvoPose2D: Pushing the Boundaries of 2D Human Pose Estimation using Neuroevolution.\nImplemented using Python 3.7 and TensorFlow 2.3.\n\n**Proof of results**: The json files containing the results reported in the paper can be found [here](https://drive.google.com/drive/folders/1iO_EVuIYQP1BHG6A0hWaAmD52PA3C7HI?usp=sharing).\nThese results were generated using the bfloat16 models.\n\n## Getting Started\n1. If you haven't already, [install Anaconda or Miniconda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html)\n2. Create a new conda environment with Python 3.7: ```$ conda create -n evopose2d python==3.7```\n3. Clone this repo: ```$ git clone https://github.com/wmcnally/evopose2d.git```\n4. Install the dependencies using ```$ pip install -r requirements.txt```\n5. Download the 2017 COCO [training](http://images.cocodataset.org/zips/train2017.zip) and [validation](http://images.cocodataset.org/zips/val2017.zip) images and extract.\n6. Download the 2017 COCO [annotations](http://images.cocodataset.org/annotations/annotations_trainval2017.zip) and extract to the same folder.\n6. Download the validation person [detections](https://drive.google.com/drive/folders/1fRUDNUDxe9fjqcRZ2bnF_TKMlO0nB_dk?usp=sharing) (from HRNet repo). \n7. Use [write_tfrecords.py](./write_tfrecords.py) and the detection json to generate the training and validation TFRecords. If using Cloud TPU, upload the TFRecords to a Storage Bucket. \n\n\n## Demo\n1. Download a pretrained float32 model from [here](https://drive.google.com/drive/folders/1neywqc7OC5dRErQJFCnCor5fphkKCzHh?usp=sharing) and place it in a new ```models``` directory.\n2. Run ```$ python3 demo.py -c [model_name].yaml -p [/path/to/coco/dataset]``` The test image result will be written to the main directory. Prediction visualization for image id 785 using evopose2d_M_f32 model:\n\n![alt text](./demo_img.jpg)\n\n\n## Validation\nDownload a pretrained model from [here](https://drive.google.com/drive/folders/1neywqc7OC5dRErQJFCnCor5fphkKCzHh?usp=sharing) and place it in a new ```models``` directory. The bfloat16 models run best on TPU, and might be slow on GPU. \n\nModify the paths to the TFRecords and validation annotation json in the [yaml](./configs) file of the model you downloaded. If using GPU, change the validation batch size to suit your total GPU memory.\n\n**GPU:** ```$ python3 validate.py -c [model_name].yaml```\n\n**Cloud TPU:** ```$ python3 validate.py -c [model_name].yaml --tpu [tpu_name]```\n\n## Training\nModify the paths to the TFRecords and validation annotation json in the [yaml](./configs) file of the model you want to train. If using GPU, change the training and validation batch sizes to suit your total GPU memory and set bfloat16 to 'false'.\n\n**GPU:** ```$ python3 train.py -c [model_name].yaml```\n\n**Cloud TPU:** ```$ python3 train.py -c [model_name].yaml --tpu [tpu_name]```\n\n## Neuroevolution\nModify the paths to the TFRecords and validation annotation json in [E3.yaml](./configs/E3.yaml).\n\nTo run on 4 Cloud TPUs, e.g., with names [node-1, node-2, node-3, node-4]: ```$ python3 ga.py -c E3.yaml -a 1 2 3 4```\n\nSee [ga.py](./ga.py) arguments for more details. \n\n## Acknowledgements\n\nHardware: \n- NVIDIA GPU Grant\n- [TensorFlow Research Cloud (TFRC) program](https://www.tensorflow.org/tfrc)\n\nGitHub Repositories:\n- [https://github.com/mks0601/TF-SimpleHumanPose](https://github.com/mks0601/TF-SimpleHumanPose)\n- [https://github.com/microsoft/human-pose-estimation.pytorch](https://github.com/microsoft/human-pose-estimation.pytorch)\n- [https://github.com/HRNet/HRNet-Human-Pose-Estimation](https://github.com/HRNet/HRNet-Human-Pose-Estimation)\n- [https://github.com/megvii-detection/MSPN](https://github.com/megvii-detection/MSPN)\n- [https://github.com/mks0601/PoseFix_RELEASE](https://github.com/mks0601/PoseFix_RELEASE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwmcnally%2Fevopose2d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwmcnally%2Fevopose2d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwmcnally%2Fevopose2d/lists"}