Skip to content

🧙 Develop

Prolix is a lightweight command‑line tool that runs YOLO‑based object detection and classification on Panoramax pictures. The code is split into a handful of thin, well‑defined modules that make adding new models or analysis pipelines straightforward.

Repository layout

prolix/
├─ main.py               # Typer CLI – the public entry point
├─ runners/              # Per-feature detection modules
├─ analyzers/            # De-duplicate and summarize detections
├─ utils/                # Helper classes (Annotation, Crop, etc.)
├─ upload_annotations.py # Send annotations to Panoramax API
└─ loggers.py            # Display progress in processing

Core concepts

Layer Responsibility Typical files
Runners Loads a model, runs inference, returns a list of Crop or Prob objects runners/*.py
Analyzers Post‑processes runner output: dedupe, clustering, export analyzers/*.py
Models Configuration for a YOLO/transformer checkpoint, download helper models.py

How a command flows

  1. CLI (in main.py) calls a runner or analyzer.
  2. A runner loads the corresponding model (Model, HFModel, …) and runs inference via runners.detect or runners.classifier.
  3. The runner returns low‑level objects (Crop, Prob). The analyzer converts them to Locate‑Object format, clusters, and finally writes GeoJSON files.
  4. Optional upload step uses upload_annotations.upload_from_geojson.

Makefile shortcuts

Target Description
fmt Run ruff auto‑formatting
lint Run ruff linter
type-check Run mypy
docs Build MkDocs static site

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. To contribute, you can:

  1. Fork the repo and create a feature branch.
  2. Add or update documentation in docs/.
  3. Ensure make fmt lint type-check all pass.
  4. Open a merge request with a clear description of the change.