====================================================================
PLANTWILDV2 FINAL CLEANING AND GROUP-AWARE SPLIT
====================================================================

Review file used: audit/near_cross_class_review_completed.xlsx
NOTE: filepath columns from the XLSX were ignored; only pair_id and decision were used.

MANUAL CROSS-CLASS REVIEW
Pairs reconstructed from raw CSV: 129
SAME: 117
DIFFERENT: 12
Confirmed SAME connected components: 96
Images excluded by confirmed cross-class SAME components: 211

EXCLUSIONS
Exact duplicates with conflicting labels: 256
Redundant exact same-class copies: 269
Confirmed cross-class near-duplicates: 211
Total excluded images: 736

FINAL CLEAN DATASET
Images: 10752
Classes: 115
Atomic split groups: 10327
Same-class near-duplicate groups: 387
Images belonging to same-class near-duplicate groups: 812
Remaining same-class dHash candidate edges used for grouping: 465

SPLIT
train: 7534 (70.07%)
validation: 1609 (14.96%)
test: 1609 (14.96%)
Split seed: 42
All 115 classes are represented in train, validation, and test.
No duplicate_group_id occurs in more than one split.

10 SMALLEST FINAL CLASSES
broccoli ring spot: 6
coffee black rot: 6
peach rust: 8
coffee brown eye spot: 12
peach anthracnose: 13
carrot cercospora leaf blight: 16
plum bacterial spot: 16
tobacco frogeye leaf spot: 17
bell pepper frogeye leaf spot: 19
raspberry leaf spot: 19

10 LARGEST FINAL CLASSES
citrus canker: 388
wheat stripe rust: 324
wheat head scab: 278
grape downy mildew: 277
wheat powdery mildew: 262
apple scab: 253
soybean frog eye leaf spot: 209
corn smut: 202
wheat septoria blotch: 198
wheat loose smut: 190

OUTPUT FILES
audit/manifest_final_clean.csv
audit/split_manifest.csv
audit/excluded_final.csv
audit/split_groups.csv
audit/split_by_class.csv
audit/cross_class_review_applied.csv
audit/final_split_summary.txt
