High-level toolkit for crystal detection on microscopy images using YOLO, with size-based safety alerts, model benchmarking, and XTC production pipelines for LCLS workflows.
Use this repository to:
- Develop and validate crystal-detection models.
- Compare models for speed vs accuracy.
- Run production inference pipelines on XTC data.
- Deploy inference in C++ with ONNX Runtime.
scripts/model_dev/- R&D workflows: data prep, training, inference, and evaluation.scripts/production/- Production XTC pipelines (parallel and legacy serial).models/- Benchmark reports, model-comparison context, and archived results.yolov8_cpp/- C++ inference path with ONNX Runtime.requirements.txt- Python dependencies for development and benchmarking.
- Use
scripts/model_dev/when building or improving a model. - Use
scripts/model_dev/benchmarking/when selecting a model based on runtime and detection quality. - Use
models/when reviewing benchmark outcomes and historical model performance. - Use
scripts/production/inference_xtc_parallel_pipeline/for operational runs at scale (recommended). - Use
scripts/production/inference_xtc_serial_pipeline/only for legacy compatibility. - Use
yolov8_cpp/for C++/ONNX deployment scenarios.
- Prepare/curate data and labels.
- Train and validate candidate models.
- Benchmark candidates and choose deployment model.
- Run production pipeline on target runs.
- Monitor outputs and iterate model updates when needed.
- Detection predictions and size measurements.
- Accuracy metrics (such as mAP50, precision, recall).
- Speed statistics and Pareto-style speed/accuracy comparisons.
- Production CSV outputs for downstream operational use.
scripts/model_dev/README.mdscripts/model_dev/benchmarking/README.mdscripts/production/inference_xtc_parallel_pipeline/README.mdscripts/production/inference_xtc_serial_pipeline/README.mdmodels/README.mdyolov8_cpp/README.md
- The parallel production pipeline is the default path for new operational runs.
- Most scripts rely on environment-specific paths and compute settings; adapt them to your infrastructure.