How experiencor/keras-yolo2 works
Project type and purpose
• This is a stand-alone Python-based deep learning library and demo suite implementing YOLOv2 (object detection) in Keras with a TensorFlow backend.
• It provides end-to-end pipelines for:
• Data preparation (VOC/COCO style annotations)
• Anchor generation
• Model construction (various backbones and YOLO heads)
• Training (train.py)
• Inference/prediction (predict.py)
• Jupyter notebooks for step-by-step walkthroughs and demos
File structure
• Top-level scripts:
• train.py: orchestrates reading config → data loader → model → training loop → save weights
• gen_anchors.py: reads dataset statistics → k-means anchors → prints results
• backend.py / frontend.py: define the network components
• preprocessing.py: image and annotation loading, augmentation (utils.py)
• config.json: central configuration for model hyperparams, file paths, anchors, labels
• requirements.txt: dependencies (keras, tensorflow, imgaug, etc.)
• Examples & notebooks illustrate usage; experimental folder holds side scripts (yolo3_detect.py).
• There is no separate “frontend/backend” in the web sense—rather “frontend.py” defines the YOLO prediction head, “backend.py” builds the feature extractor (MobileNet, ResNet, etc.)
README for additional insights
• README outlines:
• Supported backbones (MobileNet, Inception3, SqueezeNet, etc.)
• Detailed config schema
• Workflow for data prep → config editing → anchors → training → prediction
• Dependency on external pretrained weights (hosted on Google Drive)