update README
Browse files
README.md
CHANGED
|
@@ -13,12 +13,14 @@ short_description: RTMO PyTorch Checkpoint Tester
|
|
| 13 |
|
| 14 |
# RTMO PyTorch Checkpoint Tester
|
| 15 |
|
| 16 |
-
This HuggingFace Space provides a real-time 2D multi-person pose estimation demo using the RTMO model from OpenMMLab, accelerated with ZeroGPU.
|
| 17 |
|
| 18 |
## Features
|
| 19 |
|
| 20 |
- **Remote Checkpoint Selection**: Choose from multiple pre-trained variants (COCO, BODY7, CrowdPose, retrainable RTMO-s) via a dropdown.
|
| 21 |
- **Custom Checkpoint Upload**: Upload your own `.pth` file; the application auto-detects RTMO-t/s/m/l variants.
|
|
|
|
|
|
|
| 22 |
- **Threshold Adjustment**: Fine-tune **Bounding Box Threshold** and **NMS Threshold** sliders to refine detections.
|
| 23 |
- **Example Images**: Three license-free images with people are included for quick testing via the **Examples** panel.
|
| 24 |
- **ZeroGPU Acceleration**: Utilizes the `@spaces.GPU()` decorator for GPU inference on HuggingFace Spaces.
|
|
@@ -26,10 +28,15 @@ This HuggingFace Space provides a real-time 2D multi-person pose estimation demo
|
|
| 26 |
## Usage
|
| 27 |
|
| 28 |
1. **Upload Image**: Drag-and-drop or select an image in the **Upload Image** component (or choose from **Examples**).
|
| 29 |
-
2. **
|
| 30 |
-
3. **
|
| 31 |
-
4. **
|
| 32 |
-
5. **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
## Remote Checkpoints
|
| 35 |
|
|
@@ -54,10 +61,12 @@ The following variants are available out of the box:
|
|
| 54 |
- **Monkey-Patch**: Applies a regex patch to bypass `mmdet`’s MMCV version assertion for compatibility.
|
| 55 |
- **Variant Detection**: Inspects `backbone.stem.conv.conv.weight` channels in the checkpoint to select the correct RTMO variant.
|
| 56 |
- **Checkpoint Management**: Remote files are downloaded to `/tmp/{key}.pth` on demand; uploads use the provided local path.
|
| 57 |
-
- **
|
|
|
|
| 58 |
|
| 59 |
## Files
|
| 60 |
|
| 61 |
- **app.py**: Main Gradio application script.
|
| 62 |
- **requirements.txt**: Python dependencies, including MMCV and MMPose.
|
| 63 |
- **README.md**: This documentation file.
|
|
|
|
|
|
| 13 |
|
| 14 |
# RTMO PyTorch Checkpoint Tester
|
| 15 |
|
| 16 |
+
This HuggingFace Space provides a real-time 2D multi-person pose estimation demo using the RTMO model from OpenMMLab, accelerated with ZeroGPU. It supports both image and video inputs.
|
| 17 |
|
| 18 |
## Features
|
| 19 |
|
| 20 |
- **Remote Checkpoint Selection**: Choose from multiple pre-trained variants (COCO, BODY7, CrowdPose, retrainable RTMO-s) via a dropdown.
|
| 21 |
- **Custom Checkpoint Upload**: Upload your own `.pth` file; the application auto-detects RTMO-t/s/m/l variants.
|
| 22 |
+
- **Image Input**: Upload images for single-frame pose estimation.
|
| 23 |
+
- **Video Input**: Upload video files (e.g., `.mp4`, `.mov`, `.avi`, `.mkv`, `.webm`) to perform pose estimation on video sequences and view annotated outputs.
|
| 24 |
- **Threshold Adjustment**: Fine-tune **Bounding Box Threshold** and **NMS Threshold** sliders to refine detections.
|
| 25 |
- **Example Images**: Three license-free images with people are included for quick testing via the **Examples** panel.
|
| 26 |
- **ZeroGPU Acceleration**: Utilizes the `@spaces.GPU()` decorator for GPU inference on HuggingFace Spaces.
|
|
|
|
| 28 |
## Usage
|
| 29 |
|
| 30 |
1. **Upload Image**: Drag-and-drop or select an image in the **Upload Image** component (or choose from **Examples**).
|
| 31 |
+
2. **Upload Video**: Drag-and-drop or select a video file in the **Upload Video** component.
|
| 32 |
+
3. **Select Remote Checkpoint**: Pick a preloaded variant from the dropdown menu.
|
| 33 |
+
4. **(Optional) Upload Your Own Checkpoint**: Provide a `.pth` file to override the remote selection; the model variant is detected automatically.
|
| 34 |
+
5. **Adjust Thresholds**: Set **Bounding Box Threshold** (`bbox_thr`) and **NMS Threshold** (`nms_thr`) to control confidence and suppression behavior.
|
| 35 |
+
6. **Run Inference**: Click **Run Inference**.
|
| 36 |
+
7. **View Results**:
|
| 37 |
+
- For images, the annotated image will appear in the **Annotated Image** panel.
|
| 38 |
+
- For videos, the annotated video will appear in the **Annotated Video** panel.
|
| 39 |
+
The active checkpoint name will appear below.
|
| 40 |
|
| 41 |
## Remote Checkpoints
|
| 42 |
|
|
|
|
| 61 |
- **Monkey-Patch**: Applies a regex patch to bypass `mmdet`’s MMCV version assertion for compatibility.
|
| 62 |
- **Variant Detection**: Inspects `backbone.stem.conv.conv.weight` channels in the checkpoint to select the correct RTMO variant.
|
| 63 |
- **Checkpoint Management**: Remote files are downloaded to `/tmp/{key}.pth` on demand; uploads use the provided local path.
|
| 64 |
+
- **Image & Video Support**: The `predict` function automatically handles both image and video inputs, saving annotated frames or video to `/tmp/vis` and displaying them in the UI.
|
| 65 |
+
- **Output**: Saves visualization images or videos to `/tmp/vis` and displays them in the UI panels.
|
| 66 |
|
| 67 |
## Files
|
| 68 |
|
| 69 |
- **app.py**: Main Gradio application script.
|
| 70 |
- **requirements.txt**: Python dependencies, including MMCV and MMPose.
|
| 71 |
- **README.md**: This documentation file.
|
| 72 |
+
|