Trainbot (Onlytrains) is a computer vision application that automatically detects trains passing a fixed camera, stitches the train's frames into a single composite image, and logs sightings to a SQLite database. It is designed to run on a Raspberry Pi with a camera (USB, Pi Cam 3, or video file) and can optionally upload results via FTP to a web server. The project is unmaintained as stated in the README. Architecturally, it is a monolith Go backend with three CLI binaries: `trainbot` (main detection loop), `confighelper` (interactive crop selection), and `cleanup` (orphaned blob removal). The backend captures frames using `pkg/vid` (abstraction over V4L2, libcamera-vid, ffmpeg), processes them through a stitch pipeline that detects motion, computes frame offsets via patch matching, fits a constant-acceleration model using RANSAC, and then blends frames into a single JPEG and an animated GIF. Results are stored in a SQLite database and served by a built-in HTTP server. The frontend is a Vue 3 static SPA that loads the SQLite database client-side to display train sightings, stats, and images with no server-side rendering. Key highlights include highly optimized image processing: the `pkg/pmatch` package offers four implementations of cosine-similarity patch search (slow Go, optimized Go, Cgo, Vulkan compute), and the `pkg/ransac` package provides a generic RANSAC fitter for the speed model. The codebase demonstrates strong engineering craftsmanship with a clear package structure, extensive tests, test data sets, and a CI pipeline. However, heavy reliance on Cgo and Vulkan, plus the explicit unmaintained status, introduce cross-compilation complexity and potential drift from modern tooling.
MAGSAC is a C++ library with Python bindings (pymagsac) implementing robust model fitting algorithms for computer vision, including homography, fundamental matrix, essential matrix, rigid transformation, and 2D line estimation. The core algorithm is a template class `MAGSAC<DatumType, ModelEstimator>` that supports sigma-consensus and MAGSAC++ scoring, with interchangeable sampling strategies (uniform, PROSAC, P-NAPSAC, NG-RANSAC, AR-Sampler) and adaptive inlier selection. The Python API mirrors the C++ functionality via pybind11, accepting numpy arrays for point correspondences and returning estimated models with inlier masks. The repository also includes benchmark datasets and Jupyter notebook examples demonstrating usage. While the library is primarily a software package, it contains research-grade data and notebooks, giving it a hybrid character. The code is well-architected with clean separation of concerns, though it has minor maintenance risks such as memory management caveats and limited platform support (Linux/Windows only).
pydegensac is a Python library for robust geometric estimation in computer vision, providing RANSAC-based estimation of fundamental matrices (F) and homographies (H). The core algorithms â DEGENSAC (degeneracy-aware sampling) and PROSAC (progressive sampling) â are implemented in C++ and exposed to Python via pybind11 with Eigen/numpy array interop. The primary deliverable is a pip-installable wheel (pydegensac), built for cp38âcp314 across manylinux2014, manylinux_2_28, macOS, and Windows via GitHub Actions and cibuildwheel. Entry points are the Python API (fundamental matrix and homography estimation) backed by the C++ core exposed through `bindings.cpp`. The codebase is research-grade: the C++ core uses conditional compilation flags (`__HASHING__`, `__D3__`, `__LSQ_BEFORE_LO__`), raw pointers, manual memory management, and commented-out code. Documentation is thin â `bindings.cpp` has placeholder docstrings, and usage examples live in `examples/how-to-use-detailed.ipynb` and benchmark scripts. The repo vendors a full copy of pybind11 (headers, tests, build helpers), which risks drift from upstream. Benchmark infrastructure (`benchmarks/run.py`, `benchmarks/methods.py`) compares against OpenCV RANSAC, MAGAC, Poselib, and Poselib-PROSAC on standard multi-view datasets (IMC/photo-tourism for F, EVD and HPatchesSeq for H), but requires downloading ~1.4 GB of external data from CMP, Hugging Face, and other URLs. Testing relies on golden data (`.npz` files under `tests/data/`) generated by `scripts/make_golden_data.py` from a known-good git HEAD with fixed seeds, plus the bundled pybind11 test suite. There are no unit tests for the C++ core itself. The repo is actively maintained (last commit 2026-09-18, 1 open issue) with wheels published to PyPI, though the publish workflow requires a manual trigger with a build run ID. Known issues include a PROSAC score-orientation bug (benchmark-only, indicating dataset-compatibility risk), platform-specific xfails in the bundled pybind11 tests, and compiler-specific workarounds for GCC/Clang/MSVC. Overall, this is a functional, well-packaged research library with solid CI/CD but notable technical debt: vendored pybind11, placeholder documentation, external data dependencies, and research-code cruft. It is best suited for users needing a fast, reference-quality RANSAC implementation for F/H estimation, or for researchers studying DEGENSAC/PROSAC variants. The hybrid nature is worth noting: while primarily a software library, it includes benchmark/data components (golden data, dataset downloaders, evaluation harnesses) that are integral to its testing story.