forked from openxrlab/xrmocap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] Estimate mview sperson dataset in filesystem (openxrlab#123)
1. Add `HummanSMCDataCovnerter`, converting SMCs to dataset in filesystem. 2. Add a tool `run_mview_sperson_estimator`, running estimation on the files above. Also this tool addresses the requirements mentioned in the [issue-118](openxrlab#118). 3. Add datautils for better logger.
- Loading branch information
1 parent
4039369
commit 8b4931d
Showing
10 changed files
with
718 additions
and
18 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
configs/modules/data/data_converter/humman_smc_data_converter_wo_perception.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
type = 'HummanSMCDataCovnerter' | ||
data_root = 'xrmocap_data/humman_dataset' | ||
bbox_detector = None | ||
kps2d_estimator = None | ||
batch_size = 1000 | ||
view_idxs = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | ||
meta_path = 'xrmocap_data/humman_dataset/xrmocap_meta' | ||
visualize = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
## Tool run_mview_sperson_estimator | ||
|
||
|
||
- [Overview](#overview) | ||
- [Argument: estimator_config](#argument-estimator_config) | ||
- [Argument: output_dir](#argument-output_dir) | ||
- [Argument: disable_log_file](#argument-disable_log_file) | ||
- [Argument: visualize](#argument-visualize) | ||
- [Example](#example) | ||
|
||
### Overview | ||
|
||
If you don't want to write code to call the `MultiViewSinglePersonSMPLEstimator` yourself, it's okay. We provide [this tool](../../../tools/run_mview_sperson_estimator.py) that can be run under a specific directory structure. Before using this tool, you need to organize the files required by the estimator according to the rules below. | ||
|
||
``` | ||
your_dataset_root | ||
└── xrmocap_meta | ||
├── dataset_name.txt | ||
├── scene_0 | ||
│ ├── camera_parameters | ||
│ │ ├── fisheye_param_00.json | ||
│ │ ├── fisheye_param_01.json | ||
│ │ └── ... | ||
│ ├── image_list_view_00.txt | ||
│ ├── image_list_view_01.txt | ||
│ ├── ... | ||
│ ├── images_view_00 | ||
│ │ ├── 000000.jpg | ||
│ │ ├── 000001.jpg | ||
│ │ └── ... | ||
│ ├── images_view_01 | ||
│ │ └── ... | ||
│ └── ... | ||
└── scene_1 | ||
└── ... | ||
``` | ||
`fisheye_param_{view_idx}.json` is a json file for XRPrimer FisheyeCameraParameter, please refer to [XRPrimer docs](https://github.com/openxrlab/xrprimer/blob/main/docs/en/data_structure/camera.md) for details. | ||
`image_list_view_{view_idx}.txt` is a list of image paths relative to your dataset root, here's an example. | ||
``` | ||
xrmocap_meta/scene_0/images_view_00/000000.jpg | ||
xrmocap_meta/scene_0/images_view_00/000001.jpg | ||
... | ||
``` | ||
|
||
### Argument: estimator_config | ||
|
||
`estimator_config` is the path to a `MultiViewSinglePersonSMPLEstimator` config file. For more details, see docs for `MultiViewSinglePersonSMPLEstimator` and the docstring in [code](../../../xrmocap/estimation/mview_sperson_smpl_estimator.py). | ||
|
||
Also, you can find our prepared config files at `config/estimation/mview_sperson_smpl_estimator.py`. | ||
|
||
### Argument: data_root | ||
|
||
`data_root` is the path to the root directory of dataset. In the file tree example given above, `data_root` should point to `your_dataset_root`. | ||
|
||
### Argument: meta_path | ||
|
||
`meta_path` is the path to the meta data directory. In the file tree example given above, `meta_path` should point to `xrmocap_meta`. | ||
|
||
### Argument: output_dir | ||
|
||
`output_dir` is the path to the directory saving all possible output files, including multi-view keypoints2d, keypoints3d, SMPLData and visualization videos. | ||
|
||
### Argument: disable_log_file | ||
|
||
By default, disable_log_file is False and a log file named `{tool_name}_{time_str}.txt` will be written. Add `--disable_log_file` makes it True and the tool will only print log to console. | ||
|
||
### Argument: visualize | ||
|
||
By default, visualize is False. Add `--visualize` makes it True and the tool will visualize keypoints3d with an orbit camera, overlay projected keypoints3d on some views, and overlay SMPL meshes on one view. | ||
|
||
### Example | ||
|
||
Run the tool with visualization. | ||
|
||
```bash | ||
python tools/mview_sperson_estimator.py \ | ||
--data_root xrmocap_data/humman_dataset \ | ||
--meta_path xrmocap_data/humman_dataset/xrmocap_meta \ | ||
--visualize | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.