Model Railroad
Control and Intelligence

Software for running model railroads: seeing where the trains are, and deciding where they go next.

Projects

Each stands on its own, and they are built to meet.

📷
Alpha

Occupancy

Camera-based track occupancy detection. Photograph the layout, mark the cars and the sensors, and watch occupancy live — entirely in your browser. No trained model is published yet, so the live view shows every sensor as unknown.

🚦
Alpha

Control

Scheduling, dispatching, and driving trains. The research core is deadlock-free, high-throughput dispatch: many trains sharing one layout without ever backing each other into a corner.

The rest of rails49 (command station, signals, the layout corpus, setup) is listed on the rails49 GitHub profile.

Alpha

How Occupancy Works

Photograph the layout, mark the cars and the sensors, and watch occupancy live.

📐

Layout Editor

Load overhead photographs of your layout, calibrate the scale against a known reference length, mark each car by its two ends, and place the sensors you want reported.

📦

The .r49 Format

A single portable archive holding your layout photographs alongside a validated manifest of scale, calibration, and every labelled car. Open and save it straight from the browser, and share it with the community corpus.

🧠

Trained From Shared Layouts

A detector trained on the labelled cars in the corpus finds every car in each camera frame. No trained model is published yet.

🎥

Live View

Point a phone or tablet camera at the layout and each sensor shows occupied, clear or unknown. If the camera has moved since the photographs were taken, the view stops reporting until you override it.

🔒

Runs In Your Browser

ONNX Runtime executes the network on-device via WebAssembly. Your photographs and layout files never leave the machine you are working on.

📏

Scale Aware

Calibration is expressed in dots-per-track. The goal is a model trained on one layout that transfers to another regardless of gauge, from Z through G scale.

Built With

Lit & Vite
TypeScript
ONNX Runtime
WebAssembly
PyTorch