A Tensorflow+Keras implementation of Stacked Hourglass Network for Keypoint Detection with several residual layers and can be trained to detect keypoints of chairs and cars.
- Python 3.6+
- Tensorflow 2.2.0+ (For GPU, use Tensorflow-GPU 2.2.0+)
- Pandas
To install these dependencies for CPU, run
pip install -r requirements.txt
(For GPU support, change line tensorflow>=2.2.0
to tensorflow-gpu>=2.2.0
in requirements.txt)
To train from scratch, run
python train.py
Note: The train, data, evaluation parameters are present in params.py
The dataloader expects a csv file indicating (assuming N
keypoints)
<image_name>, <keypointX_1>, <keypointY_1>, <keypointX_2>, <keypointY_2>,.... <keypointX_N>, <keypointY_N>
The image directory (DATA_DIR
) and annotation csv (anno_file
) need to be specified in params.py
.
(Visualization is under progress)