hand-detection.PyTorch
hand-detection.PyTorch copied to clipboard
FaceBoxes for hand detection in PyTorch
hand-detection.PyTorch
Hand detection in PyTorch
Contents
- Installation
- Training
- Demo
- References
Installation
-
Install PyTorch-0.4.0 according to your environment.
-
Clone this repository. We will call the cloned directory as
$HandBoxes_ROOT.
git clone https://github.com/zllrunning/hand-detection.PyTorch.git
- Compile the nms:
./make.sh
Note: We currently only support PyTorch-0.4.0 and Python 3+.
Training
- Prepare training data:
-- download EgoHands dataset
-- generate bounding boxes and visualize them to ensure correctness
-- convert bbox file to VOC format
cd $HandBoxes_ROOT/
sh prepare_data.sh
- Train the model using EgoHands dataset:
python3 train.py
If you do not wish to train the model, you can download our pre-trained model and save it in $HandBoxes_ROOT/weights.
Demo
- Evaluate the trained model using:
# evaluate using GPU
python test.py --video data/video/hand.avi
# evaluate using cpu
python test.py --image data/video/CARDS_OFFICE_H_T_frame_1085.jpg --cpu
References
This project is based on FaceBoxes.PyTorch