Complete documentation for all ClassiPyR features.
Interface Overview
ClassiPyR interface showing the title bar, sidebar, and main image gallery area. Click to enlarge.
Title Bar
- App name and version
-
Mode indicator: Shows current sample and mode
(Validation/Annotation)
- Validation mode: Shows accuracy percentage
- Annotation mode: Shows progress (X/Y classified)
Validation vs Annotation Mode
Validation Mode
- Activated when loading samples with existing auto-classifications
- Original classifications shown with confidence scores
- Statistics track how many you’ve changed
- Accuracy percentage calculated
Annotation Mode
- Activated for samples without classifications
- All images start as “unclassified”
- Progress shows classified vs remaining
- Validation statistics tab shows annotation progress instead
Samples with Both Modes
Some samples may have both manual annotations AND auto-classifications (e.g., you previously annotated a sample, then ran a classifier on it). For these samples:
- The sample dropdown shows ✎✓ indicator
- When loaded, you can switch between modes using the button in the header
- Each mode maintains its own state independently
Working with Images
Image Cards
Each image card displays:
- The plankton image
- ROI number
- Classification score (if available)
- Original class (if relabeled)
Border colors:
- Default (gray): Unchanged
- Yellow: Relabeled in this session
- Blue: Currently selected
Image card border colors: gray (unchanged), yellow (relabeled), blue (selected). Click to enlarge.
Measuring Images
The measure tool allows you to measure distances in images.
Using the Measure Tool
- Click the Measure button (ruler icon) in the toolbar to activate measure mode
- Click and drag on any image to draw a measurement line
- The distance is displayed in both micrometers (µm) and pixels
- Click elsewhere on the image to clear the measurement
- Click the Measure button again to deactivate measure mode
Measure tool showing distance in micrometers and pixels. Click to enlarge.
Classification Sources
ClassiPyR supports multiple classification input
formats.
CSV Files
Standard classification CSV output. Required columns:
-
file_name: Image filename (e.g.,D20230101T120000_IFCB134_00001.png) -
class_name: Predicted class name
Optional columns:
-
score: Classification confidence (0-1)
Example CSV:
file_name,class_name,score
D20230101T120000_IFCB134_00001.png,Diatom,0.95
D20230101T120000_IFCB134_00002.png,Ciliate,0.87
D20230101T120000_IFCB134_00003.png,Dinoflagellate,0.72
Flexible column matching: The app searches for
columns containing “file” and “class” in their names, so variants like
filename, image_file,
predicted_class, or class will also work.
Different CNN pipelines: If your classifier produces
different column names, rename them to file_name and
class_name, or contact us to add support for your
format.
Files are searched recursively in the Classification Folder.
MATLAB Classifier Output
Files matching *_class*.mat pattern containing:
-
roinum: ROI numbers -
TBclass_above_threshold: With threshold -
TBclass: Without threshold
Threshold option: Enable in Settings to include unclassified predictions below confidence threshold.
Note: Reading MATLAB classifier output requires Python (via iRfcb).
Output Files
When you save, the app creates:
Annotation MAT File
output/[sample_name].mat
MATLAB-compatible format with:
-
classlist: ROI numbers and class indices - Compatible with ifcb-analysis toolbox
Note: Saving MAT files requires Python with scipy.
Settings Reference
Folder Paths
| Setting | Description |
|---|---|
| Classification Folder | Source of CSV/MAT classifications |
| ROI Data Folder | IFCB raw files (ROI/ADC/HDR) |
| Output Folder | Where MAT and CSV output goes |
| PNG Output Folder | Where organized images go |
Python Configuration
| Setting | Description |
|---|---|
| Python Virtual Environment Path | Path to venv with scipy installed |
The venv path can also be specified when launching the app:
run_app(venv_path = "/path/to/your/venv")Statistics and Reporting
Session Cache
The app maintains a session cache:
- Switching samples saves work automatically
- Returning to a sample restores your changes
- Cache persists until you close the app
Note: Always click Save before closing for permanent storage.
Settings Persistence
ClassiPyR stores your settings in a configuration file
that follows R standards:
-
Linux:
~/.local/share/ClassiPyR/settings.json -
macOS:
~/Library/Application Support/ClassiPyR/settings.json -
Windows:
%LOCALAPPDATA%/ClassiPyR/settings.json
Settings are loaded automatically when you start the app, so your
folder paths, class list location, and Python venv path are remembered
between sessions. Settings can be reset by specifying
run_app(reset_settings = TRUE).
Dependencies
ClassiPyR relies on iRfcb for
all IFCB data operations:
- Extracting images from ROI files
- Reading ADC metadata (dimensions, timestamps)
- Reading and writing MATLAB .mat files
- Class list handling
iRfcb is installed automatically as a dependency when you install
ClassiPyR.
