diff --git a/.gitignore b/.gitignore index bc30919..074abba 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ inference_test_output *.diff *.jpg !/projects/DensePose/doc/images/*.jpg - +!/JEDE.jpg # compilation and distribution __pycache__ _ext diff --git a/JEDE.jpg b/JEDE.jpg new file mode 100644 index 0000000..31a23a1 Binary files /dev/null and b/JEDE.jpg differ diff --git a/README.md b/README.md index c45e238..e0114f3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,11 @@ -# Pose-guided R-CNN +# JEDE: Universal Jersey Number Detector for Sports + +This codebase contains code for the paper "[JEDE: Universal Jersey Number Detector for Sports](https://hengyueliu.com/assets/files/JEDE_Universal_Jersey_Number_Detector_for_Sports.pdf)" published on IEEE TCSVT, 2022. + +

+ +

## Installation @@ -30,11 +37,17 @@ python -m pip install -e detectron2 See [installation instructions](https://detectron2.readthedocs.io/tutorials/install.html) for more details on installing detectron2. +## Weights + +The weights trained with all images across soccer and basketball videos can be found in the release. + ## Dataset Preparation ### Prepare Jersey Number +Currently, the dataset is not released due to policies. But, it will be released in the future. + ``` mkdir datasets/jnw ln -s datasets/jnw detectron2/datasets/jnw @@ -59,4 +72,20 @@ wget http://ufldl.stanford.edu/housenumbers/train.tar.gz mkdir svhn tar -xvzf train.tar.gz -C svhn rm train.tar.gz +``` + +## Citations + +If you find our work helpful, please cite: +```bibtex +@article{liu2022jede, + title={JEDE: Universal Jersey Number Detector for Sports}, + author={Liu, Hengyue and Bhanu, Bir}, + journal={IEEE Transactions on Circuits and Systems for Video Technology}, + volume={32}, + number={11}, + pages={7894--7909}, + year={2022}, + publisher={IEEE} +} ``` \ No newline at end of file diff --git a/experiments/jede_R_50_FPN_baseline.sh b/experiments/jede_R_50_FPN_baseline.sh index 5b4b4aa..12c5c42 100644 --- a/experiments/jede_R_50_FPN_baseline.sh +++ b/experiments/jede_R_50_FPN_baseline.sh @@ -94,14 +94,14 @@ python train_net.py \ INPUT.MIN_SIZE_TEST 960 \ OUTPUT_DIR "./output/jede_R_50_FPN_baseline/test_4" -#python train_net.py \ -# --num-gpus 2 \ -# --resume \ -# --eval-only \ -# --config-file configs/pg_rcnn/digit_twochannels/test_0_parallel_gn.yaml \ -# DATASETS.TRAIN_VIDEO_IDS [4] \ -# DATASETS.TEST_VIDEO_IDS [0,1,2,3] \ -# INPUT.AUG.COPY_PASTE_MIX 0 \ -# OUTPUT_DIR "./output/jede_R_50_FPN_baseline/test_5" \ -# INPUT.MAX_SIZE_TEST 400 \ -# INPUT.MIN_SIZE_TEST 240 \ No newline at end of file +python train_net.py \ + --num-gpus 2 \ + --resume \ + --eval-only \ + --config-file configs/pg_rcnn/digit_twochannels/test_0_parallel_gn.yaml \ + DATASETS.TRAIN_VIDEO_IDS [4] \ + DATASETS.TEST_VIDEO_IDS [0,1,2,3] \ + INPUT.AUG.COPY_PASTE_MIX 0 \ + OUTPUT_DIR "./output/jede_R_50_FPN_baseline/test_5" \ + INPUT.MAX_SIZE_TEST 400 \ + INPUT.MIN_SIZE_TEST 240 \ No newline at end of file diff --git a/experiments/jede_R_50_FPN_best.sh b/experiments/jede_R_50_FPN_best.sh index 23441d5..a348b01 100644 --- a/experiments/jede_R_50_FPN_best.sh +++ b/experiments/jede_R_50_FPN_best.sh @@ -76,3 +76,39 @@ python train_net.py \ DATASETS.TEST_VIDEO_IDS [0,1,2,3] \ INPUT.AUG.COPY_PASTE_MIX 0 \ OUTPUT_DIR "./output/jede_R_50_FPN_best/test_5" + +# eval +python train_net.py \ + --num-gpus 2 \ + --resume \ + --eval-only \ + --config-file configs/pg_rcnn/digit_twochannels/test_0_parallel_gn_pe_pretrain_copypastemix_swapdigit_less_anchors_unfreeze_b8.yaml \ + MODEL.ROI_NECK_BASE_BRANCHES.PERSON_BRANCH.UP_SCALE 1 \ + MODEL.ROI_NECK_BASE_BRANCHES.PERSON_BRANCH.DECONV_KERNEL 1 \ + MODEL.ROI_NECK_BASE_BRANCHES.KEYPOINTS_BRANCH.UP_SCALE 1 \ + MODEL.ROI_NECK_BASE_BRANCHES.KEYPOINTS_BRANCH.DECONV_KERNEL 1 \ + MODEL.ROI_NECK_BASE_BRANCHES.PERSON_BRANCH.POOLER_RESOLUTION 56 \ + MODEL.ROI_NECK_BASE_BRANCHES.KEYPOINTS_BRANCH.CONV_SPECS 3,1,1 \ + DATASETS.TRAIN_VIDEO_IDS [0,1,2,3] \ + DATASETS.TEST_VIDEO_IDS [4] \ + OUTPUT_DIR "./output/jede_R_50_FPN_best/test_4" +# INPUT.MAX_SIZE_TEST 1600 \ +# INPUT.MIN_SIZE_TEST 960 \ + +python train_net.py \ + --num-gpus 2\ + --resume \ + --eval-only \ + --config-file configs/pg_rcnn/digit_twochannels/test_0_parallel_gn_pe_pretrain_copypastemix_swapdigit_less_anchors_unfreeze_b8.yaml \ + MODEL.ROI_NECK_BASE_BRANCHES.PERSON_BRANCH.UP_SCALE 1 \ + MODEL.ROI_NECK_BASE_BRANCHES.PERSON_BRANCH.DECONV_KERNEL 1 \ + MODEL.ROI_NECK_BASE_BRANCHES.KEYPOINTS_BRANCH.UP_SCALE 1 \ + MODEL.ROI_NECK_BASE_BRANCHES.KEYPOINTS_BRANCH.DECONV_KERNEL 1 \ + MODEL.ROI_NECK_BASE_BRANCHES.PERSON_BRANCH.POOLER_RESOLUTION 56 \ + MODEL.ROI_NECK_BASE_BRANCHES.KEYPOINTS_BRANCH.CONV_SPECS 3,1,1 \ + DATASETS.TRAIN_VIDEO_IDS [4] \ + DATASETS.TEST_VIDEO_IDS [0,1,2,3] \ + INPUT.AUG.COPY_PASTE_MIX 0 \ + INPUT.MAX_SIZE_TEST 400 \ + INPUT.MIN_SIZE_TEST 240 \ + OUTPUT_DIR "./output/jede_R_50_FPN_best/test_5" \ No newline at end of file