How scheckmedia/photils-cli works
Photils-cli is an offline image-tagging command-line application. The principal workflow accepts an image path, preprocesses the image, runs the local neural-network model, maps predictions to labels, and prints or writes the resulting tags; confidence values are optional. Users can customize or translate labels with a per-user override file. The graph separates CLI handling, inference stages, and tag resources. The sampled source shows the main runtime wiring; README-described platform-specific override locations are not independently verified here.
Main entry points: inference.cpp Inference coordinator · main.cpp Argument handling · photils.onnx ONNX model · labels.json Label catalog
Components 12
CLI
- Argument handling
src/main.cpp
Inference
- Inference coordinator
src/inference.cpp - Image preprocessing
src/inference.cpp - Model prediction
src/inference.cpp - ONNX model
res/photils.onnx
Tag resources
- Label catalog
res/labels.json - Label overrides
src/inference.cpp - User data paths
src/helper.cpp
Other components
- CLI user
- Input image
- Standard output
- Output file
Connections 17
- CLI user → Argument handling: provides arguments
- Argument handling → Inference coordinator: requests tags
- Argument handling → Input image: names image
- Inference coordinator → Image preprocessing: prepares image
- Image preprocessing → Input image: reads image
- Inference coordinator → Label catalog: loads labels
- Inference coordinator → ONNX model: loads model
- Inference coordinator → User data paths: gets data path
- Inference coordinator → Label overrides: loads overrides
- Label overrides → User data paths: reads override file
- Inference coordinator → Model prediction: runs inference
- Model prediction → ONNX model: forwards input
- Model prediction → Label catalog: maps scores
- Model prediction → Label overrides: substitutes labels
- Inference coordinator → Argument handling: returns predictions
- Argument handling → Standard output: prints tags
- Argument handling → Output file: writes tags