follow up first commit

This commit is contained in:
zakariasaputra committed 2026-07-29 14:57:14 +07:00
1 parent c666715e29
commit 3750799dab
48 files changed
+5257

No files matched your search

+135
View File
@@ -0,0 +1,135 @@
cage_id: kandang_1
csv_path: data/historical_weights_manual_iot_review.csv
video_root: /media/asus/One Touch/VIDEOS/cycle7/kandang-atas
camera_glob: "kandang_{cage}_camera_{num}_*.mp4"
cameras: [CC2, CC3]
camera_nums:
CC2: 2
CC3: 3
exclude_cycle_days: [0, 1, 2]
# Production model (train): ages 3–35. Evaluate late holdout stays 29–35 for GO (fit on 3–28).
train_cycle_day_min: 3
train_cycle_day_max: 35
# Smart fuse: ignore cams below this count; else weight by detection_count.
fuse_min_detections: 100
# Vision drives weight; Gompertz age curve is diagnostic only.
model_mode: vision_primary
# Production feature preset: mask-centric shape geometry (no detection_count/mean_confidence).
features:
preset: mask_max
chicken_counter_config: /media/asus/One Touch/LABS/chicken-counting/chicken-sukawarna-existing/configs/cycle7_batch.yaml
calibration_dir: configs/calibration
output_dir: output
# Segmentation pilot: chicken class only (seg model has classes 0/1, no half-chicken).
detection:
model_path: /media/asus/One Touch/LABS/chicken-counting/chicken-sukawarna-existing/chicken-detection-model-v26n-seg-300e-best-2026-04-18.pt
classes: [0]
geometry:
prefer_mask: true
min_mask_fill_ratio: 0.30
fallback_to_bbox: true
# Shape stats use mask rows only when at least this many mask detections exist.
min_mask_for_stats: 20
# Second filter: drop camera-day area anomalies outside the robust normal band.
size_distribution:
enabled: true
metric: area_cm2
method: mad_zscore
z_max: 2.0
min_samples: 30
# Relaxed filters for small chicks on early cycle days (cycle_day <= day_max).
early_cycle:
day_max: 17
quality:
min_overlap_ratio: 0.35
min_box_area_px: 200
area_outlier_min_factor: 0.10
conf_min: 0.12
min_centroid_distance_px: 15
max_pairwise_iou: 0.55
min_frame_clean_ratio: 0.01
min_aspect_ratio: 0.35
max_aspect_ratio: 2.2
max_birds_per_frame: 50
size_distribution:
z_max: 3.0
# Soften day-21 cliff: in-between gates for mid flock.
mid_cycle:
day_min: 18
day_max: 24
quality:
conf_min: 0.20
min_box_area_px: 800
min_overlap_ratio: 0.55
min_centroid_distance_px: 30
max_pairwise_iou: 0.40
max_birds_per_frame: 45
min_frame_clean_ratio: 0.05
min_aspect_ratio: 0.40
max_aspect_ratio: 2.0
size_distribution:
z_max: 2.5
# Red-line aisle corridors (widened ~80px/side for early small chicks at corridor edges).
sampling_corridors:
CC2:
boundary_x: [230, 970, 1220, 1690]
inclusion_pairs: [[230, 970], [1220, 1690]]
y_bounds: [380, 720]
CC3:
boundary_x: [150, 720, 920, 1650]
inclusion_pairs: [[150, 720], [920, 1650]]
y_bounds: [330, 720]
sampling:
# One short clip (~10–15 min, often ~12:00) per day/camera: sample the whole file.
use_full_video: true
# Only used when use_full_video is false (long recordings with a morning weigh window).
morning_weigh_in_time: "12:00:00"
window_minutes_before: 30
window_minutes_after: 30
# Unique-chicken extract: track every frame, one best obs per track_id.
initial_stride_frames: 4
min_stride_frames: 2
target_detections: 600
late_cycle_target_detections: 600
late_cycle_day_threshold: 20
per_track_cap: 1
track_every_n_frames: 1
keep_best_per_track: true
allow_stride_multipass: false
convergence_window: 50
convergence_pct: 0.01
convergence_checks_required: 3
low_confidence_detection_threshold: 100
# During extract, save green/red filter overlays every N video frames (0 = off).
extract_overlay_every_n_frames: 1000
# Stop sampling when cart/camera reverse is confirmed (chicken_counter optical flow).
stop_on_backward: true
quality:
allowed_class_ids: [0]
reject_class_ids: []
# Tier 1 — containment (relaxed for dense late-cycle frames)
require_full_bbox_inside_roi: false
min_overlap_ratio: 0.75
# Tier 2 — isolation
max_pairwise_iou: 0.30
min_centroid_distance_px: 45
min_centroid_distance_bbox_factor: 0.35
max_birds_per_frame: 40
# Tier 3 — shape and confidence
conf_min: 0.30
min_box_area_px: 2000
min_aspect_ratio: 0.5
max_aspect_ratio: 1.8
area_outlier_min_factor: 0.5
area_outlier_max_factor: 1.8
# Tier 4 — frame gate
min_frame_clean_ratio: 0.1
min_accepted_per_frame: 1