Csmart Methodology for Weight Estimation

Csmart Digit converts image-based measurements into precise weight estimates by applying class-specific density and shape data embedded in the AI model. This eliminates the need for physical weighing, enabling fast, consistent, and scalable mass assessments of seed samples. The accuracy of this process relies on Reference Files, single-class analysis files with a known sample weight, used to calibrate and link calculated volumes to real-world mass.

Reference Files

Definition Reference Files are the foundation for calculating per-class density values used in weight estimation. They are standard Csmart analysis files (HDF5 format) that contain:

  • Images belonging to a single class only

  • The measured weight of that sample

These files allow the system to correlate the visual measurements (projected area and estimated volume) with the actual physical weight, producing accurate density coefficients for that class.

Purpose The main goal of a Reference File is to establish a reliable mapping between image-derived geometric measures and real-world mass. By knowing the weight of a precisely segmented and classified sample, the system can calculate a density value (g/cm³ for volumetric classes or g/cm² for planar classes) that will be applied to future samples of that class.

Creation Process To create a Reference File:

  1. Select a single-class sample

  2. Weigh the sample using a precise scale.

  3. Create a new analysis in Csmart – Pass the sample through the machine using the vibrator feeder at a slow speed to prevent overlapping seeds and ensure all seeds are captured.

  4. Run the analysis using any existing AI model.

  5. Save the measured weight in Lot Info → Physical Aspects → Sample Weight (g).

  6. The file is now ready to be imported as a Reference File into the AI model.

Per‑Class Density & Shape Maps

Before weight calculation, the system retrieves two key mappings from the AI model metadata stored in the ONNX file:

  • Density Map Assigns each class a density value, reflecting either volumetric (g/cm³) or planar (g/cm²) mass distribution. These values are derived from Reference Files. When imported, the system stores the area and volume measurements for the selected class, along with the computed density. This process can be repeated for each class in the model.

  • Shape Map Indicates, per class, whether to interpret the projected area as a three-dimensional volume (True) or a two-dimensional area (False).

Notes and Best Practices

  • Each class can have its own Reference File.

  • If you do not have a Reference File for a given class, you can manually enter a density value based on a similar class.

  • Once imported, the system stores the total area, total volume, shape type, and calculated density for that class.

  • If a class is missing from the Density Map, default density and shape values are used.

Weight Computation Steps

A four-stage workflow transforms image-derived measurements into meaningful weight estimates:

  1. Area Extraction and Unit Conversion Each seed is segmented from the background, and its projected area is measured in square millimeters (mm²). This raw area is converted to square centimeters (cm²) to match the units used by density coefficients.

  2. Volume Approximation or Area Retention Depending on the seed’s shape classification:

    • 3D seeds – The system uses a heuristic lookup to approximate volume from the measured area.

    • Flat seeds – The two-dimensional area is retained directly as the geometric measure.

    This approach avoids explicit depth calculations while still capturing relative mass differences.

  3. Density Application The selected geometric measure (approximated volume or area) is multiplied by the class-specific density coefficient:

    • Volume-density (g/cm³) for 3D seeds

    • Area-density (g/cm²) for flat seeds

    This yields an estimated weight for each seed.

  4. Aggregation and Insights

    • Individual seed weights are summed to compute the total sample mass.

    • Breakdowns by screen size and class index provide detailed size distribution and compositional insights.

    • Each class’s contribution is expressed as a percentage of the total mass, giving a clear overview of sample makeup.

Note: While the underlying mathematics involves area-to-volume conversion and density multiplication, the user workflow focuses only on entering volume-density or area-density values, keeping the complexity behind the scenes.

Illustrative Example Illustrative Example

Step-by-Step Breakdown

  • Coffee Seed (3D)

Measured area: 50 mm² → 0.50 cm²
Heuristic volume approximation: ≈ 0.35 cm³
Volume-density coefficient: 0.50 g/cm³
Calculated weight: 0.35 × 0.50 ≈ 0.18 g
  • Coffee Husk (Planar)

Measured area: 40 mm² → 0.40 cm²
Area-density coefficient: 0.10 g/cm²
Calculated weight: 0.40 × 0.10 = 0.04 g
Total mass: 0.18 + 0.04 = 0.22 g
  • Composition:

Coffee Seed: (0.18 ÷ 0.22) × 100 ≈ 82 %
Coffee Husk: (0.04 ÷ 0.22) × 100 ≈ 18 %

Summary

A coffee seed with a projected area of 50 mm² (0.50 cm²) is modeled as a three-dimensional object, using a heuristic volume estimate of 0.35 cm³. When multiplied by its volume-density coefficient of 0.50 g/cm³, the estimated weight is 0.18 g.

Meanwhile, a coffee husk measured at 40 mm² (0.40 cm²) uses an area-density coefficient of 0.10 g/cm² to yield 0.04 g. Together, they total 0.22 g, with the seed representing ~82 % and the husk ~18 % of the total mass—despite their similar areas.

This example illustrates how image-derived measurements combined with density coefficients enable accurate weight and composition estimates without the need for a physical scale.

Video Tutorial

Last updated