field2sim / README.md
dtabaa's picture
Add files using upload-large-folder tool
6ff9e19 verified
|
Raw History Blame Contribute Delete
5.62 kB
metadata
pretty_name: field2sim
viewer: false
tags:
  - gaussian-splatting
  - 3d
  - agriculture
  - plant-phenotyping
  - fruit-counting
  - instance-segmentation
size_categories:
  - n<1K

field2sim: GreenSplat capsicum release (v1.0.0)

3D Gaussian Splatting reconstructions of five greenhouse capsicum (sweet pepper) group captures from 2026-05-05. Each scene holds only the plant gaussians, with per-gaussian semantic and fruit-instance annotations. All units are metres.

scene gaussians fruits cameras m / SfM unit ply GB
capsicum-20260505-orange-group-s01 5,666,796 419 1944 0.6759 1.43
capsicum-20260505-orange-group-s02 5,645,588 690 3681 0.6590 1.42
capsicum-20260505-red-group-s01 4,100,722 199 4087 0.6127 1.03
capsicum-20260505-red-group-s02 3,371,665 76 1548 0.3904 0.85
capsicum-20260505-yellow-group-s01 3,132,605 265 875 0.3423 0.79

Download

hf download dtabaa/field2sim --repo-type dataset --local-dir field2sim
cd field2sim && sha256sum -c SHA256SUMS
python devkit/example_counting.py capsicum-20260505-red-group-s02

Layout

<scene>/
  gaussians.ply    3DGS gaussians + annotation columns (metres)
  cameras.json     registered cameras, nerfstudio transforms.json schema
  metadata.json    counts, scale, extents, per-fruit boxes
devkit/            field2sim.py (loader + renderer), example_counting.py
scenes.json        index of the scenes
SHA256SUMS         sha256sum -c SHA256SUMS

gaussians.ply

A binary little-endian PLY with a single vertex element. The standard 3DGS columns come first, in the INRIA order: x y z, f_dc_0..2, f_rest_0..44, opacity, scale_0..2, rot_0..3. They are stored before activation: logit opacity, log scales, an unnormalised wxyz quaternion, and SH degree 3 with the SH coefficients channel-major. The annotations follow as extra columns:

column type meaning
semantic int32 0 = plant (non-fruit), 1 = fruit
instance int32 manually corrected fruit id 0..n_fruits-1; -1 = not fruit
fruit_score float32 SAM3 "pepper" masks uplifted to 3D (LUDVIG), in [0, 1]
pred_instance int32 automatic instance clustering before correction; -1 = none

3DGS parsers select columns by name, so they ignore the extra columns. Every column is 4 bytes wide, and no extra column name starts with rot, scale_ or f_, the prefixes the reference loader matches on. The release was checked to load in the INRIA reference GaussianModel.load_ply, in plyfile, in gsplat and in Spark. The header comment lines repeat this table.

cameras.json

This file follows the nerfstudio transforms.json schema, with per-frame PINHOLE intrinsics (fl_x fl_y cx cy w h). transform_matrix is the camera-to-world matrix in OpenGL camera axes (+x right, +y up, +z back). For OpenCV axes, right-multiply it by diag(1,-1,-1,1).

The world frame is the frame of gaussians.ply: the COLMAP SfM frame scaled to metres. The intrinsics refer to the COLMAP-undistorted images at 1600 px on the long side. The images themselves are not part of this release; file_path gives their names.

Each frame also has exposure, the 3x4 affine colour correction learnt per image in training. To compare a render with its photograph, use rgb_photo ≈ rgb_render @ E[:, :3] + E[:, 3], with rgb as a row vector in [0, 1].

metadata.json

  • counts: numbers of gaussians, fruits, fruit gaussians and cameras.
  • units: metres_per_sfm_unit and how it was measured. Known 0.15 m reference squares were measured in the SfM cloud, giving 12–16 sides and a relative SD of 1.8–3.2 %.
  • orientation.estimated_gravity_down: the mean image-down axis of the cameras, about +y. The frame is not gravity-aligned.
  • extents: AABBs of all gaussian centres, of the 1st–99th percentiles, of the fruits and of the camera centres.
  • fruits[]: one entry per fruit with id (the instance value), source_label, n_gaussians, retained_fraction, centroid, aabb, and obb {center, rotation, extent}. The OBB rotation columns are the box axes in world space, sorted by decreasing extent (full side lengths).

Devkit: field2sim

devkit/field2sim.py is a single-file API (numpy, torch, gsplat) that loads a scene and renders RGB, depth, semantic and fruit-instance images from any camera:

import sys; sys.path.insert(0, "devkit")
from field2sim import Scene

scene = Scene("capsicum-20260505-red-group-s02")
for view in scene.render_sequence(c.scaled(0.5) for c in scene.cameras[::25]):
    print(view.camera.name, view.visible_instances(min_pixels=50))

devkit/example_counting.py builds ground truth for counting over a sequence (fruits visible per frame, distinct fruits seen so far). It uses two sequences: the original capture trajectory and a synthetic pass along the row.

Known caveats

  • The boxes enclose the reconstructed fruit surface, mostly the side the cameras saw, so they underestimate the depth of a fruit.
  • Restricting the scene to plants removed some annotated fruits that lay outside the plant region: 19 in orange-s01, 1 in orange-s02, 50 in red-s01 and 3 in red-s02. In orange-s01, three fruits were partly removed; their retained_fraction is below 1.
  • 19 fruits have fewer than 50 gaussians. They are probably fragments; filter them on n_gaussians if needed.
  • fruit_score and pred_instance are model outputs. semantic and instance are the manually corrected ground truth.