Skip to content

Commit

Permalink
reorganize the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Fang-Haoshu committed Jul 11, 2018
1 parent 33ef1b2 commit 917ad4b
Show file tree
Hide file tree
Showing 91 changed files with 19 additions and 177,578 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
human_detection/output
examples/results
examples/res
PoseFlow/__pycache__
PoseFlow/*.npy
PoseFlow/alpha-pose-results-test.json
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ To match poses that correspond to the same person across frames, we also provide
./install.sh
```

1. Download the models manually: **ssd_coco.pth**([Google Drive](https://drive.google.com/open?id=1ifUNnxSDOP7InBtKy5CGnRAMLD4-d4Ct) | [Baidu pan](https://pan.baidu.com/s/1mon7Ht6ObqrS2ZY955swpg)), **pyra_4.pth** ([Google Drive](https://drive.google.com/open?id=1oG1Fxj4oBfKwD1W_2QObxltWybuIk7Y6) | [Baidu pan](https://pan.baidu.com/s/14ONL_T_d1twm9Lxac5x-Ew)), **yolov3.weights**([Google Drive](https://drive.google.com/open?id=1yjrziA2RzFqWAQG4Qq7XN0vumsMxwSjS) | [Baidu pan](https://pan.baidu.com/s/108SjV-uIJpxnqDMT19v-Aw)). Place them into `./models/ssd`, `./models/sppe` and `./models/yolo` respectively.
1. Download the models manually: **pyra_4.pth** ([Google Drive](https://drive.google.com/open?id=1oG1Fxj4oBfKwD1W_2QObxltWybuIk7Y6) | [Baidu pan](https://pan.baidu.com/s/14ONL_T_d1twm9Lxac5x-Ew)), **yolov3.weights**([Google Drive](https://drive.google.com/open?id=1yjrziA2RzFqWAQG4Qq7XN0vumsMxwSjS) | [Baidu pan](https://pan.baidu.com/s/108SjV-uIJpxnqDMT19v-Aw)). Place them into `./models/sppe` and `./models/yolo` respectively.


## Quick Start
- **Demo**: Run AlphaPose for all images in a folder and visualize the results with:
```
python demo_yolo.py \
--inputlist ./list-coco-minival500.txt \
python3 demo.py \
--inputlist examples/list-coco-demo.txt \
--imgpath ${img_directory} \
--outputpath ./coco-minival
--outputpath examples/res
```


Expand Down
File renamed without changes.
114 changes: 0 additions & 114 deletions demo_fast.py

This file was deleted.

108 changes: 0 additions & 108 deletions demo_faster.py

This file was deleted.

2 changes: 0 additions & 2 deletions examples/img-list.txt

This file was deleted.

File renamed without changes.
File renamed without changes.
10 changes: 0 additions & 10 deletions fetch_models.sh

This file was deleted.

4 changes: 2 additions & 2 deletions fn.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ def vis_res(final_result, outputpath, format='coco'):
continue
cor_x, cor_y = int(kp_preds[n, 0]), int(kp_preds[n, 1])
part_line[n] = (cor_x, cor_y)
cv2.circle(img, (cor_x, cor_y), 6, p_color[n], -1)
cv2.circle(img, (cor_x, cor_y), 4, p_color[n], -1)
# Draw limbs
for start_p, end_p in l_pair:
if start_p in part_line and end_p in part_line:
start_p = part_line[start_p]
end_p = part_line[end_p]
cv2.line(img, start_p, end_p, YELLOW, 2)

cv2.imwrite(os.path.join(outputpath, 'res' + im_name), img)
cv2.imwrite(os.path.join(outputpath, im_name), img)


def getTime(time1=0):
Expand Down
10 changes: 5 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pip install torch
pip install torchvision
pip install -e git+https://github.com/ncullen93/torchsample.git#egg=torchsample
pip install visdom
pip install nibabel
pip3 install --user torch
pip3 install --user torchvision
pip3 install --user -e git+https://github.com/ncullen93/torchsample.git#egg=torchsample
pip3 install --user visdom
pip3 install --user nibabel
Loading

0 comments on commit 917ad4b

Please sign in to comment.