title | version | writer | type | objective |
---|---|---|---|---|
Long rage Multi person Tracking |
1.0 |
khosungpil |
Version document |
Samsung GTC |
- OS: ubuntu 16.04
- CPU Resource: Inter(R) Core(TM) i7-6700 CPU @ 3.40GHz
- GPU Resource: GTX 1080ti 1x
- Docker Version: 19.03.8
├── build
├── configs
├── demo
├── filters
├── demo.py
├── predictor.py
└── key.sh
├── detectron2
├── checkpoint
├── config
├── data
├── model_zoo
├── modeling
├── structures
└── utils
├── pose_box_correction.py
└── video_visualizer.py
├── input
└── *.mpy
├── model
└── *.pkl
├── output
└── *.json
├── docker_setting.sh
└── setup.py
- Recommend using nvidia-docker
Name | lr sched |
train time (s/iter) |
inference time (s/im) |
train mem (GB) |
box AP |
kp. AP |
model id | download |
---|---|---|---|---|---|---|---|---|
R101-FPN | 3x | 0.390 | 0.076 | 6.1 | 56.4 | 66.1 | 138363331 | model | metrics |
MOUNTED_PATH="/home/cvpr-pu/sungpil/posetron"
NAME="gtc"
docker run --runtime=nvidia -it --name ${NAME} -v /dev/snd:/dev/snd -v ${MOUNTED_PATH}:/${NAME} -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e DISPLAY=unix$DISPLAY \
--cap-add SYS_PTRACE \
--ip host khosungpil/gtc:3.0
-
xhost local:root
-
Edit
MOUNTED_PATH
where code file is indocker_init.sh
-
Docker images in dockerhub: https://hub.docker.com/repository/docker/khosungpil/gtc
It will be installed automatically when rundocker_init.sh
-
Run
docker_init.sh
-
Check Mounted folder
- Join in running docker container
rm -rf /${NAME}/build/lib.linux-x86_64-3.6/detectron2/*.so
python -m pip install -e
- Move
demo/key.sh
FILE_NAME="meterialCheck_2"
rm -rf ../output/${FILE_NAME}
python demo.py --config-file ../configs/COCO-Keypoints/keypoint_rcnn_R_101_FPN_3x.yaml \
--video-input ../input/${FILE_NAME}.mp4 \
--output ../output/${FILE_NAME}/${FILE_NAME}.mp4 \
--parallel 1 \
--opts MODEL.WEIGHTS ../model/model_final_997cc7.pkl \
- Put the mp4 video fild in
input
folder - Edit
${FILE_NAME}
indemo/key.sh
- If you want to use Single GPU,
parallel
is 0 indemo/key.sh
- If you want to use Multi GPU,
parallel
is 1demo/key.sh
- Run
key.sh
- Generate detectron2 module for Pose Estimation
- Generate the list of keypoints information inferencing all video frame through pretrained model.
- The first refinement of keypoint (refer video_visualizer.py)
- The second refinement of keypoint (refer MA.py)
- Generate json file for Action Recognition
- Predict keypoints with pretrained pose estimation model. It will be implemented with generator.
PoseRefinement
for writing result information refined byMovingAvgFilter
in json file.AsyncPredictor
for optimizing inference speed when use Multi-GPU
MovingAvgFilter
class for the second refinement.- Fast refinement implementation using generator.
- Refinement every single current frame seeing previous 5 frames.
- If there is no predicted keypoints momentarily, calculate compensation value from two-side 5 frames.
- If there is no predicted keypoints in continuously, return 0 for nothing.
- Handling exception about no predicted keypoints in first and last frame.
- Remove box less than threshold from predicted bounding box.
- Track instance computing each intersection of union in every bounding box and detect overlapped instances. (Overlap)
- If a bounding box becomes in other bounding box, remove it.
- detect when the tracked instance is no longer visible for a certain period of time. (Hide)
- Predict motion for instances in hide state by extrapolation method.
- Detect instances in sit state using the angle of the waist, knees and ankles. (Sit)
- Sliding window size is 5
- For the k-th frame, k-5,k-4,...,k...,k+4,k+5 th frames to generate window.
- Generate triplet matching same instances for single window.
- Refinement keypoints that score is less than threshold value among keypoints of the k-th frame.
- Remove the refined keypoints when it is outside the bounding box.
@misc{wu2019detectron2,
author = {Yuxin Wu and Alexander Kirillov and Francisco Massa and
Wan-Yen Lo and Ross Girshick},
title = {Detectron2},
howpublished = {\url{https://github.com/facebookresearch/detectron2}},
year = {2019}
}