Edit Model
Customizing AI model parameters, classification rules, and density maps
The Edit Model screen provides advanced control over the configuration of trained ONNX models. You can customize class labels, define feature-based classification rules, configure density maps for weight estimation, and set up method equivalences — all without retraining the model.
Prerequisites
An ONNX model (
.onnx) with its accompanying JSON metadata file.
Step-by-Step Walkthrough
1. Select the Model
Click Select Model to browse for your .onnx model file. The application reads the JSON metadata and populates all editable fields.
2. Edit Model Metadata
Update general information about the model:
Database
The dataset name used for training
Species
Coffee species (Arabica, Robusta, etc.)
Variety
Coffee variety
Origin
Country or region of origin
Processing
Processing method (Natural, Washed, Honey, etc.)
3. Customize Class Labels
Edit the display names for each classification category. The model's internal class indices remain unchanged, but the labels shown in reports, dashboards, and mosaics are updated.
Subsets
Organize classes into subsets for grouped reporting:
Primary
Main defect categories (Black, Sour, etc.)
Secondary
Minor defect categories
Foreign Matter
Non-coffee material (stones, sticks)
Disregarded
Classes excluded from quality calculations
4. Configure Hue Colormap
Assign a display color to each class. These colors are used in dashboard charts, mosaic overlays, and reports. Click the color swatch next to each class to open the color picker.
5. Define Descriptive Rules
Create feature-based classification rules that supplement or override the AI model's predictions:
Click Add Rule to create a new rule.
Select the target class the rule applies to.
Define conditions using feature selectors and comparison operators:
Feature (e.g., area, perimeter, hue, entropy)
Operator (greater than, less than, equals, between)
Threshold value(s)
Multiple conditions can be combined with AND/OR logic.
Descriptive rules are applied after AI classification. They can reclassify seeds that meet specific feature criteria, acting as post-processing filters.
6. Configure Method Equivalences
Define how classification categories map to industry-standard methods (e.g., SCA, COB). This allows reports to show results according to multiple grading standards simultaneously.
7. Configure Density Maps
Set up the density parameters used for weight estimation from 2D image measurements:
Density coefficients per screen size range.
Volume-to-weight conversion factors.
Moka (Peaberry) density parameters (separate from regular beans due to different shape characteristics).
Density map accuracy directly affects weight estimation. Calibrate these values using reference samples with known weights.
8. Save Changes
Click Save to write all changes to the model's JSON metadata file. The application tracks which fields have been modified (dirty fields) and only updates changed values.
Use Reset to discard unsaved changes and revert to the last saved state.
Configuration Persistence
All edits are saved to the model's JSON metadata file (alongside the .onnx file). Changes take effect immediately for any subsequent AI analysis using this model.
Troubleshooting
Model fields are empty
JSON metadata file missing or corrupted
Ensure the .json file exists alongside the .onnx file
Save fails
File is read-only or path has special characters
Check file permissions; move the model to a clean path
Rules not applying during analysis
Rule conditions are never met
Verify thresholds and operators match expected feature ranges
Weight estimation is inaccurate
Density coefficients not calibrated
Calibrate using reference samples with known weights
Color changes not visible in dashboard
Dashboard needs to be refreshed
Navigate away and back to reload the updated colormap
Last updated