How argonalyst/darkflow works
darkflow is a Python/TensorFlow object-detection system implementing YOLO-family models. Its main user workflow is to invoke flow with model, weight and image options, construct/load a network, run inference, and save annotated images or JSON detections. A parallel training workflow parses annotated datasets, prepares batches, and trains or resumes checkpoints. The graph also shows model/config handling and the Darknet-to-TensorFlow layer/operation machinery. Edges rely on README statements or SOURCE INDEX references; unsampled behavior is not inferred beyond those references.
Main entry points: build.py TFNet runtime · darknet.py Darknet model · cli.py CLI entry · framework.py Model framework
Components 22
Entry and orchestration
- CLI entry
darkflow/cli.py - Run options
darkflow/defaults.py - TFNet runtime
darkflow/net/build.py
Model architecture
- Model configs
cfg - Darknet model
darkflow/dark/darknet.py - Model framework
darkflow/net/framework.py - YOLO v1
darkflow/net/yolo - YOLO v2
darkflow/net/yolov2
Detection workflows
- Images and annotations
- YOLO prediction
darkflow/net/yolo/predict.py - YOLOv2 prediction
darkflow/net/yolov2/predict.py - Boxes and outputs
darkflow/utils/box.py - YOLO training
darkflow/net/yolo/train.py - YOLOv2 training
darkflow/net/yolov2/train.py - Dataset preparation
darkflow/net/yolo/data.py - VOC parsing
darkflow/utils/pascal_voc_clean_xml.py
Network internals
- TensorFlow operations
darkflow/net/ops/baseop.py - Convolution layers
darkflow/dark/convolution.py - Layer weights
darkflow/dark/layer.py - Weight loading
darkflow/utils/loader.py - Config translation
darkflow/utils/process.py
Other components
- CLI user
Connections 24
- CLI user → CLI entry: invokes
README.md - CLI entry → Run options: uses options
darkflow/cli.py - CLI entry → TFNet runtime: creates runtime
darkflow/cli.py - TFNet runtime → Darknet model: builds model
darkflow/net/build.py - TFNet runtime → Model framework: selects framework
darkflow/net/build.py - TFNet runtime → TensorFlow operations: builds operations
darkflow/net/build.py - Model framework → YOLO v1: selects model
darkflow/net/framework.py - Model framework → YOLO v2: selects model
darkflow/net/framework.py - Model configs → Darknet model: defines layers
README.md - CLI user → Images and annotations: provides images
README.md - TFNet runtime → YOLO prediction: runs inference
- YOLO prediction → Boxes and outputs: decodes boxes
darkflow/net/yolo/predict.py - YOLOv2 prediction → Boxes and outputs: decodes boxes
darkflow/net/yolov2/predict.py - Boxes and outputs → CLI user: saves detections
README.md - Images and annotations → Dataset preparation: supplies training data
README.md - Dataset preparation → VOC parsing: parses annotations
darkflow/net/yolo/data.py - Dataset preparation → YOLO prediction: preprocesses samples
darkflow/net/yolo/data.py - TFNet runtime → YOLO training: trains model
- TFNet runtime → YOLOv2 training: trains model
- Darknet model → Config translation: translates config
darkflow/dark/darknet.py - Darknet model → Weight loading: loads weights
darkflow/dark/darknet.py - Layer weights → Weight loading: loads parameters
darkflow/dark/layer.py - Convolution layers → Layer weights: extends layer
darkflow/dark/convolution.py - TensorFlow operations → Convolution layers: uses layer types