Home

Awesome

UnrealEgo: A New Dataset for Robust Egocentric 3D Human Motion Capture (ECCV2022)

Official PyTorch implementation of our ECCV 2022 paper, "UnrealEgo: A New Dataset for Robust Egocentric 3D Human Motion Capture". UnrealEgo is based on an advanced concept of eyeglasses equipped with two fisheye cameras that can be used in unconstrained environments. it contains more than 450 thousand naturalistic egocentric stereo views in a wider variety of 3D environments.

img

For any questions, please contact the first author, Hiroyasu Akada [hakada@mpi-inf.mpg.de] .

Citation

    @inproceedings{hakada2022unrealego,
      title = {UnrealEgo: A New Dataset for Robust Egocentric 3D Human Motion Capture},
      author = {Akada, Hiroyasu and Wang, Jian and Shimada, Soshi and Takahashi, Masaki and Theobalt, Christian and Golyanik, Vladislav},
      booktitle = {European Conference on Computer Vision (ECCV)}, 
      year = {2022}
    } 

Updates

UnrealEgo Dataset

Download

You can download the UnrealEgo dataset on our project page or use our download script.

Our download script will download both UnrealEgo 01 ~ 06 and UnrealEgo impl. You can modify this line to download specific sets of the data.

    bash scripts/data/download_unrealego.sh [Access Token]

Please follow the steps below to obtain Google’s OAuth Token from OAuth 2.0 Playground.

Step 1: Go to OAuth 2.0 Playground

Step 2: In the “Select the Scope” box, search for “Drive API v3”, expand the scope, and select https://www.googleapis.com/auth/drive.readonly

Step 3: Click “Authorize APIs” and then “Exchange authorization code for tokens”

Step 4: Copy the “Access token” and run the download script with it

Note that this access token is valid for 1 hour. Once it expires, the download process will stop and you need to regenerate the token. You can re-run our download script with the token to resume the download process.

You can find more information about OAuth 2.0 Playground here.

Data Structure

With the download script, UnrealEgo will be stored in a single UnrealEgoData folder as below. If you downloaded each data directly from our project page, please extract and merge them accordingly.

Note that in UnrealEgo impl, we provide txt files to divide UnrealEgo into training (3820 motions), validation (493 motions), and testing (526 motions) splits.

UnrealEgoData
├── test.txt
├── train.txt
├── validation.txt
├── Environment Name 1
│   ├── Day
│   │   ├── Human Model Name 1
│   │   │	└── Glasses Name (SKM_MenReadingGlasses_Shape_01)
│   │	│		├── Motion Category 1
│   │	│		│	├── Motion Sequence 1
│   │	│		│	│	├── fisheye_final_image (RGB)
│   │   │		│	│	├── fisheye_depth_image (Depth)
│   │   │		│	│	├── json (keypoint, etc.)
│   │   │		│	│	└── all_data_with_img-256_hm-64_pose-16_npy (RGB, Heatmap, Keypoint)
│   │   │		│	│
│   │   │		│	├── Motion Sequence 2
│   │   │		│	└──...
│   │   │		│
│   │   │		├── Motion Category 2
│   │   │		└──...
│   │   │
│   │	├── Human Model Name 2
│   │	└──...
│   │	
│   └── (Night)
│   
├── Environment Name 2
├── Environment Name 3
└──...

We provide metadata for each frame:

Our camera calibration file is also available here. Note that we used the Scaramuzza fisheye camera model and that "size" and "image_center" in the calibration file are stored as [width, height].

Instruction on how to obtain device-relative poses

Please first download the original dataset (UnrealEgo 01 ~ 06). Then, simply calculate the middle point between camera_left_pts3d and camera_right_pts3d.

            device_relative_pts3d = (camera_left_pts3d + camera_right_pts3d) / 2

Note that UnrealEgo is fully compatible with UnrealEgo2. This means that you can train your method on UnrealEgo2 and test it on UnrealEgo, and vice versa.

In UnrealEgo2 and UnrealEgo-RW, the device-relative poses are already provided in the metadata (json files).

Image Visualization of the Preprocessed Data (in UnrealEgo impl)

To visualize images from the preprocessed data (all_data_with_img-256_hm-64_pose-16_npy), run the following code.

    python visualize_image.py /
        --path_npy_data [specify the path to npy data, e.g. ~/all_data_with_img-256_hm-64_pose-16_npy/frame_0.npy] /
        --save_dir [specify the dir to save images]

Images will be stored in the specified directory.

<img src=doc/input_rgb_right.png width="128"><img src=doc/input_rgb_left.png width="128"><img src=doc/gt_heatmap_right.png width="128"><img src=doc/gt_heatmap_left.png width="128">
RGB right<br>(256 × 256)RGB left<br>(256 × 256)Heatmap right<br>(64 × 64)Heatmap left<br>(64 × 64)

Motion Categories

We manually classified all of the motions into 30 motion categories as follows:

Motion CategoryExample Motions
1: jumpingcross_jumps, forward_jump, joyful_jump
2: falling downstunned, knocked_down, dying
3: exercisingair_squat, back_squat, bicycle_crunch
4: pullingpulling_a_rope
5: singingsinging, guitar_playing
6: rollingrunning_dive_roll
7: crawlingcrawl_backwards, running_crawl
8: layinglaying_breathless, stroke_shrugging
9: sitting on the groundsitting_dazed
10: crouching - normalcrouch_look_around_corner
11: crouching - turningcrouch_turn_to_stand
12: crouching - to standingcrouch_to_stand, getting_up
13: crouching - forwardcrouch_running, crouch_walk
14: crouching - backwardcrouch_run_backwards, pull_heavy_object
15: crouching - sidewayscrouch_walk_left, crouch_walk_right
16: standing - whole bodyangry, digging, looking_around
17: standing - upper bodyblow_a_kiss, bartending, disappointed
18: standing - turningchange_direction
19: standing - to crouchingkneel
20: standing - forwardwalking, open_door_outwards
21: standing - backwardrun_backward_arc_right
22: standing - sidewaysstanding_walk_right
23: dancingwave_hip_hop_dance, bellydancing
24: boxingcross_punch, reaction
25: wrestlingkicking, headbutt
26: soccerchip, goalkeeper_catch
27: baseballpitching, bunt hit
28: basketballdribble, intercepting
29: american footballreceiver_catch, quarterback_pass
30: golfgolf_drive, golf_tee_up

Implementation for pelvis-relative 3D pose estimation

Note that this is the implementation for pelvis-relative pose estimation.

If you want to use device-relative poses, please follow the instructions in the previous section and train our method from scratch.

Also, check out UnrealEgo2 and UnrealEgo-RW for the implementation of device-relative pose estimation.

Dependencies

Training

You can train the models from scratch or use trained weights. The model weights will be saved in ./log/(experiment_name).

Heatmap

    bash scripts/train/unrealego_heatmap_shared/unrealego_heatmap_shared.sh

    

AutoEncoder

    bash scripts/train/unrealego_autoencoder/unrealego_autoencoder.sh

After the training is finished, you will see quantitative results.

Testing

If you want to see quantitative results using trained weights, run the command below.

    bash scripts/test/unrealego_autoencoder.sh

Comparison Method

We also provide our implementation of a previous work, EgoGlass, without additional segmentation supervision from their 2D body part branch. You can download trained weights. If you want to use this implementation or trained weights, please cite their paper.

    bash scripts/train/unrealego/unrealego.sh

License Terms

Permission is hereby granted, free of charge, to any person or company obtaining a copy of this dataset and associated documentation files (the "Dataset") from the copyright holders to use the Dataset for any non-commercial purpose. Redistribution and (re)selling of the Dataset, of modifications, extensions, and derivates of it, and of other datasets containing portions of the licensed Dataset, are not permitted. The Copyright holder is permitted to publically disclose and advertise the use of the software by any licensee.

Packaging or distributing parts or whole of the provided software (including code and data) as is or as part of other datasets is prohibited. Commercial use of parts or whole of the provided dataset (including code and data) is strictly prohibited.

THE DATASET IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE DATASET OR THE USE OR OTHER DEALINGS IN THE DATASET.

Acknowledgments

The code is inspired by CycleGan.