Skip to main content

Desktop GUI application for training and running inference with Detectron2 models

Project description

AlchemyDetect

A desktop GUI application for training and running inference with Detectron2 models.

AlchemyDetect

Features

  • Train object detection and instance segmentation models with a visual interface
  • Live monitoring — real-time loss plot and training logs
  • Inference on single images or entire folders with result visualization
  • Model management — save and load trained weights for later use
  • Export trained models to ONNX or TensorRT for faster deployment
  • Deploy — run exported ONNX/TensorRT models in-app, independent of Detectron2

Supported Models

Model Task
Faster R-CNN (R50-FPN, R101-FPN) Object Detection
RetinaNet (R50-FPN, R101-FPN) Object Detection
Mask R-CNN (R50-FPN, R101-FPN) Instance Segmentation

Quick Start

# Install dependencies (see INSTALL.md for detailed setup)
pip install -r requirements.txt

# Run the application
python main.py

Dataset Format

AlchemyDetect uses COCO JSON format for training datasets. You need:

  • A directory containing your training images
  • A COCO-format JSON annotation file

Usage

Training

  1. Open the Train tab
  2. Select your training images directory and COCO JSON annotation file
  3. Choose a model architecture from the dropdown
  4. Set hyperparameters (learning rate, iterations, batch size)
  5. Choose an output directory
  6. Click Start Training
  7. Monitor progress via the log viewer and loss plot

Inference

  1. Open the Inference tab
  2. Click Load Model and select a trained .pth file (config.yaml will be auto-detected if in the same directory)
  3. Adjust the confidence threshold
  4. Click Run on Image or Run on Folder
  5. Browse results using the navigation buttons

Export (ONNX)

  1. Install the export extra: pip install alchemydetect[export]
  2. Open the Export tab
  3. Click Load Model... and select a trained .pth file (config.yaml is auto-detected)
  4. Choose ONNX, set the opset / input size / fp16 / dynamic-axes options
  5. Pick an output directory and click Export
  6. The output directory will contain model.onnx, the copied config.yaml / class_names.json, and an export_metadata.json describing the model

Detection models (Faster R-CNN, RetinaNet) export reliably. Mask R-CNN (instance segmentation) export is experimental.

ONNX export requires the onnx package — if you skip the [export] extra the Export tab will tell you to install it. TensorRT export appears as a format option only when the tensorrt package is installed (build the ONNX first, then a model.engine); install TensorRT manually to match your CUDA/cuDNN.

Deploy (run exported models)

  1. Open the Deploy tab
  2. Click Load Model... and select an exported model.onnx or model.engine (its export_metadata.json must sit alongside it — produced by the Export tab)
  3. Adjust the confidence threshold
  4. Click Run on Image or Run on Folder and browse results

ONNX runs via onnxruntime (GPU provider used automatically when available); .engine files run via a TensorRT runtime (requires tensorrt + pycuda). Both are independent of Detectron2's predictor. The side panel shows the active runtime provider and the per-image detection time so you can confirm whether inference is on CPU or GPU.

If exported ONNX/TensorRT inference seems slow, check the provider label — if it says CPUExecutionProvider, onnxruntime fell back to CPU (it needs a CUDA runtime matching your onnxruntime-gpu build). The real speedups come from GPU

  • TensorRT.

For how the TensorRT path works and exact install steps (Linux/Windows/Docker), see docs/TensorRT.md.

Logs

The app writes a timestamped session log to a logs/ directory (set ALCHEMYDETECT_LOG_DIR to change the location). Training/export output and inference errors — including worker tracebacks — are mirrored there so you can analyze issues after the fact. The active log path is shown in the status bar.

Tech Stack

  • Python 3.10 or 3.11
  • PyQt6 — Desktop GUI
  • Detectron2 — Object detection / instance segmentation
  • PyTorch — Deep learning backend
  • pyqtgraph — Real-time loss plotting

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alchemydetect-0.4.2.tar.gz (44.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alchemydetect-0.4.2-py3-none-any.whl (48.2 kB view details)

Uploaded Python 3

File details

Details for the file alchemydetect-0.4.2.tar.gz.

File metadata

  • Download URL: alchemydetect-0.4.2.tar.gz
  • Upload date:
  • Size: 44.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for alchemydetect-0.4.2.tar.gz
Algorithm Hash digest
SHA256 50f61ff0e5edc3d4126dedf7c106580b8f4369a9c500b46991eb9e688c238752
MD5 47e08a455658243ed80cf643a5deaa07
BLAKE2b-256 68e7bcf87bd76b342b0caa74dec5c7dd84f1ad4303e48e6844db135ee3c5c366

See more details on using hashes here.

Provenance

The following attestation bundles were made for alchemydetect-0.4.2.tar.gz:

Publisher: publish.yml on kouya-marino/AlchemyDetect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file alchemydetect-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: alchemydetect-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 48.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for alchemydetect-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 06b612681516fcaa791cf55a1f741d2f59c1795df946419578c3cdf4f9b97d28
MD5 21d5a4f077143f04f612b28100e3cfc9
BLAKE2b-256 d171506cc7b0ed4c1c656c6ece56f0b3bb48356a50030383ccdec50d92665885

See more details on using hashes here.

Provenance

The following attestation bundles were made for alchemydetect-0.4.2-py3-none-any.whl:

Publisher: publish.yml on kouya-marino/AlchemyDetect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page