Source code for EvoPose2D: Pushing the Boundaries of 2D Human Pose Estimation using Neuroevolution. Implemented using Python 3.7 and TensorFlow 2.3.
Proof of results: The json files containing the results reported in the paper can be found here.
- If you haven't already, install Anaconda or Miniconda
- Create a new conda environment with Python 3.7:
$ conda create -n evopose2d python==3.7
- Clone this repo:
$ git clone https://github.com/wmcnally/evopose2d.git
- Install the dependencies using
$ pip install -r requirements.txt
- Download the 2017 COCO training and validation images.
- Download the validation person detections (from HRNet repo).
- Use 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.
Download a pretrained model: [bfloat16, float32 (coming soon)] and place it in a new models
directory. The bfloat16 models run best on TPU, and might be slow on older GPUs.
Modify the paths to the TFRecords and validation annotation json in the config file corresponding to the model you are validating. If using GPU, change the validation batch size to suit your total GPU memory and set bfloat16 to 'false'.
GPU: $ python3 validate.py -c [model_name].yaml
Cloud TPU: $ python3 validate.py -c [model_name].yaml --tpu [tpu_name]
Modify the paths to the TFRecords and validation annotation json in the config file corresponding to the model you are training. If using GPU, change the training and validation batch sizes to suit your total GPU memory and set bfloat16 to 'false'.
GPU: $ python3 train.py -c [model_name].yaml
Cloud TPU: $ python3 train.py -c [model_name].yaml --tpu [tpu_name]
Modify the paths to the TFRecords and validation annotation json in E3.yaml.
To 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
See ga.py arguments for more details.
Hardware:
- NVIDIA GPU Grant
- TensorFlow Research Cloud (TFRC) program
GitHub Repositories: