Skip to content

Instantly share code, notes, and snippets.

@nulledge
Last active September 8, 2021 03:39
Show Gist options
  • Save nulledge/9b087ece756de53dfc71a01e52b25125 to your computer and use it in GitHub Desktop.
Save nulledge/9b087ece756de53dfc71a01e52b25125 to your computer and use it in GitHub Desktop.
Description for Human3.6M dataset.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Reference

@article{ionescu2014human3,
  title={Human3. 6m: Large scale datasets and predictive methods for 3d human sensing in natural environments},
  author={Ionescu, Catalin and Papava, Dragos and Olaru, Vlad and Sminchisescu, Cristian},
  journal={IEEE transactions on pattern analysis and machine intelligence},
  volume={36},
  number={7},
  pages={1325--1339},
  year={2014},
  publisher={IEEE}
}

Setup

Documantation

H36M/

H36MCamera.m

  • R, T: Camera transform parameters
    • R: Euler angle
    • T: World position
  • f, c, k p: Camera calibration parameters
    • f: Focal length
    • c: Principal point
    • k: Radial distortion
    • p: Tangential distortion
H36MCamera(db, s, c)
  • db: H36MDataBase instance
  • s: Subject number (camera is monocular if s == 0)
  • c: Camera number (1 <= c <= 4)
project(obj, X)
  • obj: Camera instance
  • X: 3D position list

H36MDataAccess.m

An abstract class for H36MFeatureDataAccess, H36MPoseDataAccess, H36MTOFDataAccess and H36MVideoDataAccess classes. In H36MBL/H36MComputeFeatures.m, the Exists property is used to check if the precomputed data exists and the Permanent property is used to save the precomputed data if necessary.

  • Exists: If the precomputed data exists
  • Permanent: Save the precomputed data into the file
getFrame(obj, fno)
  • obj: DataAccess instance
  • fno: Frame number

H36MDataBase.m

The preloaded data from metadata.xml file. This includes camera parameters, joint relations and etc.


H36MFeature.m

An abstract class for H36MPose2DPositionsFeature, H36MPose3DAnglesFeature, H36MPose3DPositionFeature and etc.


H36MFeatureDataAccess.m

Called by H36MPose(2DPosition|3DPosition|3DAngles)Feature.serializer(Sequence), it reads whole precomputed feature data specified by the feature and the sequence.

  • Buffer: Precomputed data
getFrame(obj, fno)
  • obj: DataAccess instance
  • fno: Frame number

H36MMyBBMask.m

Similar to the factory design pattern, generates the bounding-box mask DataAccess instance.

serializer(obj, Sequence)

Generates the bounding-box mask DataAccess instance.

  • obj: H36MMyBBMask instance
  • Sequence: Sequence instance
%% Sample code
sequence = H36MSequence(4, 3, 2, 1, -1)
bb_factory = H36MMyBBMask();
bb_handle = bb_factory.serializer(sequence);
bb_mask = bb_handle.getFrame(100);

H36MMyBGMask.m

Similar to the factory design pattern, generates the background mask DataAccess instance.

serializer(obj, Sequence)

Similar to H36MMyBBMask.serializer(obj, Sequence).


Sample codes

Visualize ToF

addpaths;
clear;
close all;

tof = H36MTOFDataAccess(6, 13, 2).getFrame(800); % subject, action, sub-action
figure(1); imshow(tof/10);

Issue

Regex error during the matlab version check

Delete the following code.

  • ${code archive}/external_utils/xml_io_tools/xml_read.m
%% Check Matlab Version
v = ver('MATLAB');
version = str2double(regexp(v.Version, '\d.\d','match','once'));
if (version<7.1)
  error('Your MATLAB version is too old. You need version 7.1 or newer.');
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment