huhb-viewer-new-version-2026-06-01 / reports /compatibility_report.txt
Hgodwarrior's picture
Upload folder using huggingface_hub
4f3e648 verified
Raw History Blame Contribute Delete
5.28 kB
================================================================================
Huhb3D Compatibility Report
Depth Maps & Camera Intrinsics - OpenCV / ROS / Blender / BOP
================================================================================
=== 1. OPENCV COMPATIBILITY ===
cam_K as 3x3 matrix (OpenCV cameraMatrix):
[761.267 0.000 400.000]
[0.000 761.267 300.000]
[0.000 0.000 1.000]
distCoeffs = None (pinhole, no distortion)
[OK] Standard pinhole model, directly usable with cv2.solvePnP()
cv2.Rodrigues(R_m2c) -> rvec = [-1.533229, -0.960920, 1.533148]
[OK] Rotation vector for cv2.solvePnP() obtained successfully
=== 2. DEPTH MAP COMPATIBILITY ===
.npy format: shape=(600, 800), dtype=uint16
.npy range: [750, 795]mm
cv2.imread(UNCHANGED): shape=(600, 800), dtype=uint16
cv2 depth range: [750, 795]mm
[OK] OpenCV reads 16-bit depth correctly
PIL.Image.open: mode=I;16, shape=(600, 800), dtype=uint16
PIL depth range: [750, 795]mm
[OK] PIL reads 16-bit depth correctly
npy vs PNG consistency: PASS
=== 3. ROS COMPATIBILITY ===
Depth encoding: 16UC1 (16-bit unsigned, 1 channel)
Depth unit: mm (conversion to meters: value / 1000.0)
ROS2 sensor_msgs/Image fields:
encoding: '16UC1'
height: 600
width: 800
step: 1600 (width * 2 bytes)
[OK] Compatible with ROS depth_image_proc package
[OK] depth_scale=1.0 means depth_png_value * 1.0 = depth_mm
CameraInfo message:
K = [761.267, 0.0, 400, 0.0, 761.267, 300, 0.0, 0.0, 1.0]
D = [] (no distortion)
R = [1,0,0,0,1,0,0,0,1] (identity)
P = [761.267,0,400.0,0, 0,761.267,300.0,0, 0,0,1,0]
[OK] Standard ROS CameraInfo format
=== 4. BLENDER COMPATIBILITY ===
Blender uses OpenGL convention (Y-up, Z-back)
Our data uses OpenCV convention (Y-down, Z-forward)
Conversion needed for Blender import:
R_opengl = R_opencv @ diag([1, -1, -1])
t_opengl = diag([1, -1, -1]) @ t_opencv
Example conversion (Frame 1):
R_opencv = [5.25988e-05, 0.0, -1.0, 0.899983, -0.435924, 4.73381e-05, -0.435924, -0.899983, -2.29291e-05]
R_opengl = [5.25988e-05, 0.0, 1.0, 0.899983, 0.435924, -4.73381e-05, -0.435924, 0.899983, 2.29291e-05]
t_opencv = [16.0, -0.000758278, 799.987]
t_opengl = [16.0, 0.000758278, -799.987]
[OK] Conversion is a simple sign flip on Y and Z axes
[NOTE] Blender Python API can automate this conversion
Depth import in Blender:
Use .npy (uint16) for highest precision
Convert to float: depth_m = depth_mm / 1000.0
Apply as Z-buffer displacement in Compositor
[OK] Depth data compatible with Blender Compositor
=== 5. BOP TOOLKIT COMPATIBILITY ===
scene_camera.json: BOP standard format
scene_gt.json: BOP standard format
cam_K: [fx, 0, cx, 0, fy, cy, 0, 0, 1] (row-major, 9 elements)
cam_R_m2c: 9-element row-major 3x3
cam_t_m2c: 3-element [tx, ty, tz] in mm
depth_scale: 1.0 (depth PNG stores mm directly)
BOP depth = pixel_value * depth_scale = pixel_value * 1
BOP depth range: [750, 795]mm
[OK] BOP depth_scale=1.0 is correct (depth PNG already in mm)
=== 6. COCO API COMPATIBILITY ===
COCO format version: 2.0
Images: 10
Annotations: 103
Categories: 1
Sample annotation keys: ['id', 'image_id', 'category_id', 'segmentation', 'area', 'bbox', 'iscrowd', 'instance_id', 'feature_type_id', 'feature_index', 'segmentation_polygon']
segmentation type: dict
RLE size: [600, 800]
RLE counts length: 66
[OK] Standard COCO RLE format
License field: N/A
[OK] Compatible with pycocotools
=== 7. YOLO COMPATIBILITY ===
YOLO detection format: 5 values per line
Sample: 0 0.499375 0.499167 0.040000 0.160000
[OK] Standard YOLO format (class cx cy w h)
YOLO seg format: 25 values per line
Sample (first 6): 0 0.505000 0.420000 0.503750 0.465000 0.481250
[OK] Standard YOLO segmentation format
================================================================================
COMPATIBILITY SUMMARY
================================================================================
[OK] OpenCV: Fully compatible (standard cam_K, R_m2c, t_m2c)
[OK] ROS/ROS2: Fully compatible (16UC1 depth, depth_scale=1.0)
[OK] Blender: Compatible (needs Y/Z sign flip for OpenGL convention)
[OK] BOP Toolkit: Fully compatible (standard BOP format)
[OK] COCO API: Fully compatible (standard RLE encoding)
[OK] YOLO: Fully compatible (standard bbox + segmentation format)
[OK] PyTorch/TF: Fully compatible (standard PNG + JSON)
BLOCKING ISSUES: None
NOTES:
1. Blender import requires coordinate conversion (Y/Z sign flip).
This is standard and well-documented for OpenCV->OpenGL conversion.
A Python conversion script is provided in the dataset package.
2. Depth PNG uses 16-bit uint16 (mode I;16 in PIL).
Some image viewers may display incorrectly (show as 8-bit).
Use cv2.imread(UNCHANGED) or PIL with I;16 mode for correct reading.
3. cam_K is stored as flat 9-element array (row-major).
Reshape to 3x3: K = np.array(cam_K).reshape(3,3)
================================================================================