Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adaptive HR Pose Estimation #479

Merged
merged 18 commits into from
Nov 23, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>
mthodoris and tsampazk authored Nov 22, 2023
commit 80a7e61a0a6381621c1f6fce7a611fee536a9b34
9 changes: 4 additions & 5 deletions docs/reference/high-resolution-pose-estimation.md
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ Constructor parameters:
Specifies the height of the image on the second inference for pose estimation procedure.
- **method**: *str, default='adaptive'
- Determines which method (*adaptive* or *primary*) is used for ROI extraction.
- **percentage_arround_crop**: *float, default=0.3*\
- **percentage_around_crop**: *float, default=0.3*\
Specifies the percentage of an extra pad arround the cropped image
- **heatmap_threshold**: *float, default=0.1*\
Specifies the threshold value that the heatmap elements should have during the first pass in order to trigger the second pass
@@ -79,7 +79,7 @@ Constructor parameters:
#### High Resolution Pose estimation using Adaptive ROI selection method
#### `HighResolutionPoseEstimationLearner.eval_adaptive`
```python
HighResolutionPoseEstimationLearner.eval_adaptive(self, dataset, silent, verbose, use_subset, subset_size, images_folder_name, annotations_filename)
HighResolutionPoseEstimationLearner.eval_adaptive(self, dataset, silent, verbose, use_subset, subset_size, upsample_ratio, images_folder_name, annotations_filename)
```

This method is used to evaluate a trained model on an evaluation dataset.
@@ -406,13 +406,12 @@ As it is shown in the previous tables, OpenDR Lightweight OpenPose achieves high
It is easier to process that image, but as it is shown in the next tables the method falls apart when it comes to accuracy and there are no detections.

We have evaluated the effect of using different inference settings, namely:
- *HRPoseEstim - Baseline*, which refers to directly using the High Resolution Pose Estimation method,which is based in Lightweight OpenPose,
- *HRPoseEstim - Baseline*, which refers to directly using the High Resolution Pose Estimation method, which is based on Lightweight OpenPose,
- *HRPoseEstim - Half*, which refers to enabling inference in half (FP) precision,
- *HRPoseEstim - Stride*, which refers to increasing stride by two in the input layer of the model,
- *HRPoseEstim - Stages*, which refers to removing the refinement stages,
- *HRPoseEstim - H+S*, which uses both half precision and increased stride, and
- *HRPoseEstim - Full*, which refers to combining all three available optimization.
was used as input to the models.
- *HRPoseEstim - Full*, which refers to combining all three available optimization and were used as input to the models.


#### Lightweight OpenPose with resizing
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
parser.add_argument("--height1", help="Base height of resizing in heatmap generation", default=360)
parser.add_argument("--height2", help="Base height of resizing in second inference", default=540)
parser.add_argument("--method", help="Choose between primary or adaptive ROI selection methodology defaults to adaptive",
default="adaptive")
default="adaptive", choices=["primary", "adaptive"])
args = parser.parse_args()

device, accelerate, base_height1, base_height2, method = args.device, args.accelerate, \
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
parser.add_argument("--height2", help="Base height of resizing in second inference", default=540)
parser.add_argument("--method", help="Choose between primary or adaptive ROI selection "
"methodology defaults to adaptive",
default="adaptive")
default="adaptive", choices=["primary", "adaptive"])
args = parser.parse_args()

device, accelerate, base_height1, base_height2, method = args.device, args.accelerate, \
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
parser.add_argument("--height1", help="Base height of resizing in first inference", default=360)
parser.add_argument("--height2", help="Base height of resizing in second inference", default=540)
parser.add_argument("--method", help="Choose between primary or adaptive ROI selection methodology defaults to adaptive",
default="adaptive")
default="adaptive", choices=["primary", "adaptive"])
args = parser.parse_args()

device, accelerate, base_height1, base_height2, method = args.device, args.accelerate, \