Skip to content

Commit 6f5f62a

Browse files
Prune unused GUI and config code
1 parent c0a96e9 commit 6f5f62a

20 files changed

Lines changed: 5 additions & 316 deletions

File tree

ARCHITECTURE.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@ With `quality_rules.auto_select_best_face: true` (the GUI default), only the top
132132
- `nms_threshold: 0.2` (down from the YuNet upstream 0.3) — more aggressive overlap suppression absorbs IoU jitter for clearly-overlapping boxes.
133133
- `fcs-core::nms::dedup_close_centers` — post-NMS pass that drops detections whose centers are within 50% of the larger bbox's longest edge. Catches the multi-scale duplicates that low-IoU NMS lets through. Wired into `apply_postprocess`.
134134

135-
#### Diagnostic logging
136-
137-
There's a `log_detection_diag` helper in `fcs-gui/src/core/export.rs` (currently commented out) that logs per-image detection counts and sorted score lists at `debug` level. Uncomment its definition and call site in `run_batch_job`, then run two batches with `RUST_LOG="fcs_gui::core::export=debug"`, capture the `[batch-diag]` lines from each into a file, and diff with `compare_batch_diag.py` to see which images are flipping. Re-comment when done.
138-
139135
## Testing Matrix
140136

141137
| Area | Location | Purpose |

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
### Coverage Follow-up #2 (fcs-utils gaps identified from coverage snapshot)
6161

6262
- [x] `fcs-utils/src/color.rs` (80%) — cover 3-char/4-char/8-char hex parsing, `0x` prefix, `RgbaColor::to_hsv`/`from_hsv`, and blue-dominant HSV branch.
63-
- [x] `fcs-utils/src/config.rs` (75%) — cover `DetectionSettings::sanitize`, `InputDimensions::sanitize`, `CropSettings::sanitize`, `MetadataMode::from_str`, `ResizeQuality::from_str` error, `ResizeQuality::as_label`, `BatchLogFormat` Display, and `GpuSettings→GpuContextOptions` From impls.
63+
- [x] `fcs-utils/src/config.rs` (75%) — cover `DetectionSettings::sanitize`, `InputDimensions::sanitize`, `CropSettings::sanitize`, `MetadataMode::from_str`, `ResizeQuality::from_str` error, `ResizeQuality::as_label`, and `GpuSettings→GpuContextOptions` From impls.
6464
- [x] `fcs-utils/src/fixtures.rs` (58%) — cover `fixtures_dir()` via `YUNET_FIXTURE_ROOT` env var, `load_fixture_bytes`, and `load_fixture_json`.
6565
- [x] `fcs-utils/src/image_utils.rs` (75%) — cover `dynamic_to_bgr_chw`, `load_image` error path, and `resize_image` Triangle (non-fast) path.
6666
- [x] `fcs-utils/src/gpu/mod.rs` (49%) — cover `pack_rgba_pixels`/`unpack_rgba_pixels` roundtrip, all `GpuStatusIndicator` constructors, `GpuStatusMode::as_str`, `GpuAvailability::is_available`/`context`, and `GpuContextPool` acquire/try_acquire/capacity/available (GPU-gated).

config/gui_settings.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
},
5656
"enhance": {
5757
"enabled": true,
58-
"preset": "none",
5958
"auto_color": false,
6059
"exposure_stops": 0.0,
6160
"brightness": 0,
@@ -70,14 +69,10 @@
7069
"enabled": true,
7170
"level": "trace"
7271
},
73-
"batch_logging": {
74-
"enabled": true,
75-
"format": "json"
76-
},
7772
"gpu": {
7873
"enabled": true,
7974
"respect_env": true,
8075
"inference": true,
8176
"preprocessing": true
8277
}
83-
}
78+
}

fcs-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ log.workspace = true
1616
rayon.workspace = true
1717
serde.workspace = true
1818
serde_json.workspace = true
19-
tempfile.workspace = true
2019
walkdir.workspace = true
2120

2221
[dev-dependencies]
2322
assert_cmd.workspace = true
2423
predicates.workspace = true
24+
tempfile.workspace = true
2525

2626
[build-dependencies]
2727
winresource.workspace = true

fcs-cli/src/workflow.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,6 @@ mod tests {
632632
let filter = QualityFilter {
633633
min_quality: None,
634634
auto_select: true,
635-
fallback: None,
636635
auto_skip_no_high: false,
637636
suffix_enabled: false,
638637
};
@@ -785,7 +784,6 @@ mod tests {
785784
let filter = Arc::new(QualityFilter {
786785
min_quality: None,
787786
auto_select: false,
788-
fallback: None,
789787
auto_skip_no_high: true,
790788
suffix_enabled: false,
791789
});
@@ -856,7 +854,6 @@ mod tests {
856854
let filter = Arc::new(QualityFilter {
857855
min_quality: Some(Quality::High),
858856
auto_select: false,
859-
fallback: None,
860857
auto_skip_no_high: false,
861858
suffix_enabled: false,
862859
});
@@ -923,7 +920,6 @@ mod tests {
923920
let filter = Arc::new(QualityFilter {
924921
min_quality: None,
925922
auto_select: true,
926-
fallback: None,
927923
auto_skip_no_high: false,
928924
suffix_enabled: false,
929925
});

fcs-gui/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ rayon.workspace = true
2929
rfd.workspace = true
3030
serde.workspace = true
3131
serde_json.workspace = true
32-
tempfile.workspace = true
3332

3433
[dev-dependencies]
3534
sha2.workspace = true

fcs-gui/src/app.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ impl App2 {
177177
current_job: None,
178178
model_path_input,
179179
model_path_dirty: false,
180-
clipboard_temp_images: Vec::new(),
181180
clipboard_paste_pending: false,
182181
suppress_image_paste: false,
183182
webcam_state: WebcamState::default(),

fcs-gui/src/core/cache.rs

Lines changed: 0 additions & 21 deletions
This file was deleted.

fcs-gui/src/core/export.rs

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -342,59 +342,6 @@ pub fn start_batch_export(app: &mut App2) {
342342
});
343343
}
344344

345-
// Per-image detection diagnostic — commented out for normal use. Uncomment
346-
// this function and the call site in `run_batch_job` to capture per-image
347-
// detection counts and sorted score lists at `debug` level for diffing two
348-
// batch runs. See ARCHITECTURE.md "GPU Inference Determinism" for usage.
349-
//
350-
// Output lines are prefixed `[batch-diag]` for easy grepping; format:
351-
// `[batch-diag] det=<n> border=<n> min=<f.4> max=<f.4> path=<...> scores=[<f.4>,...]`
352-
//
353-
// `compare_batch_diag.py` in the repo root parses two such files and reports
354-
// per-image mismatches.
355-
//
356-
// fn log_detection_diag(path: &Path, detections: &[Detection], score_threshold: f32) {
357-
// if !log::log_enabled!(log::Level::Debug) {
358-
// return;
359-
// }
360-
//
361-
// const BORDERLINE_MARGIN: f32 = 0.02;
362-
// let borderline = detections
363-
// .iter()
364-
// .filter(|d| d.score < score_threshold + BORDERLINE_MARGIN)
365-
// .count();
366-
//
367-
// let (min_score, max_score) = detections.iter().fold((f32::MAX, f32::MIN), |(lo, hi), d| {
368-
// (lo.min(d.score), hi.max(d.score))
369-
// });
370-
//
371-
// // Sort scores descending so cross-run diffs line up by rank rather than by
372-
// // detection order (which can shuffle even without count change).
373-
// let mut sorted_scores: Vec<f32> = detections.iter().map(|d| d.score).collect();
374-
// sorted_scores.sort_by(|a, b| b.partial_cmp(a).unwrap_or(Ordering::Equal));
375-
// let scores_str = sorted_scores
376-
// .iter()
377-
// .map(|s| format!("{:.4}", s))
378-
// .collect::<Vec<_>>()
379-
// .join(",");
380-
//
381-
// let (min_display, max_display) = if detections.is_empty() {
382-
// ("-".to_string(), "-".to_string())
383-
// } else {
384-
// (format!("{:.4}", min_score), format!("{:.4}", max_score))
385-
// };
386-
//
387-
// debug!(
388-
// "[batch-diag] det={} border={} min={} max={} path={} scores=[{}]",
389-
// detections.len(),
390-
// borderline,
391-
// min_display,
392-
// max_display,
393-
// path.display(),
394-
// scores_str
395-
// );
396-
// }
397-
398345
/// Run one batch job and convert any panic into a [`BatchFileStatus::Failed`].
399346
/// One corrupt/edge-case image must not abort the rest of the batch.
400347
fn run_batch_job_panic_safe(
@@ -482,11 +429,6 @@ fn run_batch_job(
482429
}
483430
};
484431

485-
// Per-batch detection diagnostic — disabled. Re-enable by uncommenting this
486-
// line and the `log_detection_diag` function below to investigate GPU inference
487-
// run-to-run variance. See ARCHITECTURE.md "GPU Inference Determinism".
488-
// log_detection_diag(&path, &detections, settings.detection.score_threshold);
489-
490432
let faces_detected = detections.len();
491433
if detections.is_empty() {
492434
return BatchFileStatus::Completed {

0 commit comments

Comments
 (0)