How florentinodev/proyecto_tortolas works
Project type and purpose
• This is a machine‐learning pipeline for semantic segmentation of drone‐generated orthomosaics in mining operations.
• It uses YOLOv8 for detecting vehicles, pipes, and structures. It covers data preparation, labeling (Roboflow), training (CPU/GPU), and inference/serving (app.py), producing vector outputs for spatial analysis.
File structure
• Top‐level scripts and configs:
• app.py – inference server or API entrypoint
• YOLO.py – training/evaluation script invoking ultralytics YOLOv8
• utils.py – shared utilities (data loaders, post‐processing)
• requirements.txt & startup.sh – environment setup
• Dockerfile – containerization
• Data directories:
• dataset/ – raw/train/validation images + labels
• test_images/ & frontend/test_images/ – sample inputs for inference
• Experiment records:
• RUN/ & frontend/RUN/ – per‐model “args.yaml” + “results.csv” logs
• Config & docs:
• config/runtime.txt – pinned runtime dependencies
• docs/ – dataset README, Roboflow instructions, publishing profiles
• CI/CD:
• .github/workflows/* (azure‐deploy.yml, deploy.yml, main_tortolas-yolo.yml) for automated training/deployment pipelines.
README for additional insights
• Confirms end-to-end workflow: data prep → Roboflow labeling → YOLOv8 training → vector outputs.
• Mentions both CPU and GPU support.
• “deploy final funcionando” implies a deployed service (likely via app.py + Docker + Azure).
a. Main components:
1. Data Ingestion & Storage
– Raw drone orthomosaic images (dataset/train/images, dataset/valid/images)
– Label files (dataset/*/labels/*.txt)
2. Labeling Service
– Roboflow integration (docs/README.roboflow.txt)
3. Preprocessing & Utilities
– utils.py transforms, caching of labels (labels.cache)
4. Training & Experimentation
– YOLO.py script, ultralytics YOLOv8 framework
– RUN/ directories record hyperparameters (args.yaml) and metrics (results.csv)
– CI/CD (GitHub Actions, .github/workflows) spin up containers or VMs
5. Model Registry / Artifact Storage
– filesystem under RUN/ and frontend/RUN/ (could also point to Azure Blob or similar)
6. Inference & Serving
– app.py provides a REST or CLI API for segmentation
– startup.sh & Dockerfile wrap the service into a container
7. Deployment Infrastructure
– Docker container → Azure Web App / Kubernetes using azure-deploy.yml
8. Frontend / Client (optional)
– Static test harness under frontend/test_images or a minimal web UI to upload images
b. Relationships & data flow
• Raw images → Labeling Service → Preprocessing → Training Pipeline → Model Artifacts
• Model Artifacts → Inference Service (app.py) → Vector Output
• CI/CD orchestrates Training and Deployment steps automatically on push
c. Architectural patterns & design principles
• Pipeline pattern: clear stages (data → training → serve)
• Separation of concerns: distinct repos/directories for data, training, inference
• Containerization: reproducible environments (Dockerfile, startup.sh, requirements.txt)
• Experiment tracking: each RUN folder captures configs + results for reproducibility
• CI/CD: automated training and deploy pipelines via GitHub Actions
d. Key technologies & frameworks
• Python 3.x, ultralytics YOLOv8, Roboflow
• Flask or FastAPI (assumed in app.py)
• Docker, GitHub Actions, Azure Web App / Azure Container Instances
• YAML for configs (args.yaml, data.yaml, runtime.txt)
• CSV for metrics logging