How javierfigueroa11/detectorpersonas works
DetectorPersonas is a Python video-analysis application: a user selects YOLO, a fine-tuned YOLO model, or Grounding DINO, then the app processes video frames, counts detections, and writes annotated video and CSV results. A separate SAM 2 entry point segments an object across a supplied frame directory and produces a video. The README is minimal; connections below are limited to the sampled source, so training and evaluation artifacts are not mapped as runtime stages.
Main entry points: main.py Application entry · procesador_videos.py Video processor · segmentador_sam2.py SAM 2 segmenter · contador_personas.py Person counter
Components 13
Video workflow
- Application entry
main.py - Input videos
data_videos - Video processor
clases/procesador_videos.py - Person counter
clases/contador_personas.py
Detection models
- YOLO detector
clases/detector_personas.py - Grounding DINO
clases/detector_grounding_dino.py - Model repository
- Fine-tuned weights
modelos_entrenados/yolov8n_finetuning_v2.pt
Segmentation
- SAM 2 segmenter
clases/segmentador_sam2.py - Input frames
dataset_personas/frames_extraidos
Results
- Video outputs
resultados - CSV outputs
resultados
Other components
- User
Connections 18
- User → Application entry: selects mode
main.py - Application entry → Input videos: reads videos
main.py - Application entry → YOLO detector: selects detector
main.py - Application entry → Grounding DINO: selects detector
main.py - Application entry → Fine-tuned weights: loads weights
main.py - Application entry → Video processor: processes video
main.py - Video processor → YOLO detector: detects frames
clases/procesador_videos.py - Video processor → Grounding DINO: detects and annotates
clases/procesador_videos.py - Video processor → Person counter: records detections
clases/procesador_videos.py - Video processor → Video outputs: writes annotated video
clases/procesador_videos.py - Application entry → Person counter: saves CSV
main.py - Person counter → CSV outputs: writes CSV
clases/contador_personas.py - Grounding DINO → Model repository: loads pretrained model
clases/detector_grounding_dino.py - User → Application entry: requests segmentation
main.py - Application entry → SAM 2 segmenter: runs segmentation
main.py - Application entry → Input frames: passes frame directory
main.py - SAM 2 segmenter → Input frames: reads and propagates
clases/segmentador_sam2.py - SAM 2 segmenter → Video outputs: writes segmented video
clases/segmentador_sam2.py