Skip to main content

PTYOLOX Garage

日本語

PTYOLOX Garage is a practical desktop and Python toolkit for training, testing, and exporting object-detection models with Pixeltable YOLOX. It provides an Ultralytics-style API and a bilingual tkinter GUI for repeatable local and offline workflows.

Features

  • Prepare Label Studio COCO exports for training
  • Train YOLOX nano, tiny, s, m, l, and x models with staged epoch schedules
  • Run inference on images, NumPy arrays, directories, and USB cameras
  • Save portable CPU-compatible .pt model packages by default
  • Export trained models to ONNX
  • Switch the GUI between English and Japanese
  • Store reusable CPU/GPU configuration profiles

Requirements

  • Python 3.10–3.13
  • Windows 11 is the primary supported platform
  • NVIDIA CUDA GPU is recommended for training; CPU inference is supported

On Linux, tkinter may need to be installed through the operating-system package manager.

Installation

From PyPI:

pip install ptyolox-garage

For development with uv:

git clone https://github.com/Moge800/ptyolox-garage.git
cd ptyolox-garage
uv sync --group dev

PyTorch builds are hardware-specific. Install the appropriate PyTorch build from the official selector when CUDA support is required.

Model Security

PyTorch checkpoint files such as .pt can execute arbitrary code when loaded. Only open model files from a trusted source. The GUI asks for confirmation before loading a model file; cancel the dialog when you cannot verify its origin.

GUI

ptyolox-garage

PTYOLOX Garage training screen

The GUI contains four work areas: training, image inference, live camera inference, and ONNX export. The initial language follows the operating-system locale and can be changed from the Language menu.

Configuration is stored in the operating system's user configuration directory. On Windows, the default location is %APPDATA%\ptyolox-garage\config.ini.

Python API

The installed package version is available without loading the ML runtime:

import ptyolox_garage

print(ptyolox_garage.__version__)
from ptyolox_garage import YOLOX

# Train from a Label Studio COCO export.
model = YOLOX("l")
model.train(
    data="data.yaml",
    epochs=[100, 200, 300],
    device="cuda:0",
    batch=16,
)

# Run inference.
model = YOLOX("best_model.pt")
results = model.predict("image.jpg", conf=0.3)
annotated = results[0].plot()

# Save a model that can be loaded on a CPU-only machine.
model.save("deployment_model.pt")

# Export to ONNX.
model.export(format="onnx")

Checkpoints created by current versions store their model size internally, so renaming a .pt file does not affect loading or fine-tuning. Inference from a legacy yolox_wrapper checkpoint does not require a size. To fine-tune a legacy checkpoint that has no size metadata, provide the known architecture explicitly:

legacy = YOLOX("legacy-model.pt", model_size="l")
legacy.train(data="data.yaml")

Checkpoint filenames are never used to infer model size. The explicit value must match the architecture that was used to create the legacy model.

Dataset Configuration

data.yaml points to a Label Studio COCO export and its image directory:

coco_json: C:/datasets/widgets/result.json
images_dir: C:/datasets/widgets/images
output_dir: C:/datasets/widgets/prepared
val_split: 0.2

PTYOLOX Garage remaps COCO category IDs, validates image paths, creates train/validation splits, and writes the directory structure expected by Pixeltable YOLOX.

Model Sizes

Name Depth Width
nano 0.33 0.25
tiny 0.33 0.375
s 0.33 0.50
m 0.67 0.75
l 1.00 1.00
x 1.33 1.25

Development

uv sync --group dev
uv run pytest
uv run ruff check .
uv build

Detailed guides are available in the English documentation and Japanese documentation.

Attribution

PTYOLOX Garage is built on Pixeltable YOLOX, which is derived from Megvii YOLOX. PTYOLOX Garage is an independent project and is not an official Pixeltable product.

License

Licensed under the Apache License 2.0. See NOTICE for attribution.

Metadata

Release files for ptyolox-garage 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ptyolox-garage 0.4.0
File Size Uploaded
ptyolox_garage-0.4.0.tar.gz 207.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ptyolox-garage 0.4.0
File Interpreter ABI Platform
ptyolox_garage-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 253.7 kB

Release files / ptyolox_garage-0.4.0.tar.gz

Download URL ptyolox_garage-0.4.0.tar.gz
Size 207.3 kB
Tags Source
SHA-256 checksum
How to use checksums
74faada2f0b930c66e6b072d487ba0eb1454cf01a1a2b50271f100cd84262c29
BLAKE2b-256 checksum
How to use checksums
00d556f5bd9acb247422f4db6d19c0680090ee7725c7570cc756507efd0d8f1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release files / ptyolox_garage-0.4.0-py3-none-any.whl

Download URL ptyolox_garage-0.4.0-py3-none-any.whl
Size 46.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2691e18cd548a7489d35fad9f07d9bbd573dd6895550f4971adbbc0c8bb15997
BLAKE2b-256 checksum
How to use checksums
4c9e66721e88dd20d24de427edcb35669223440675bcf5a29b02c3ab3162151a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.0

2 release files

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page