Conversation
|
@claude review |
|
@claude review |
|
Claude finished @Artur-man's task in 3m 45s —— View job Review: Accuracy with Structural Similarity Index
The single-histogram-per-tile design is genuinely nice — you get I could not compile — no OpenCV/R toolchain on this runner — so the compile-warning notes are by inspection. High1. The flat-tile guard is disabled, which likely breaks the headline metric — // if (std::max(var1, var2) < varThresh) { ++R.n_drop_flat; continue; }Your own comment 60 lines above ( Two knock-on effects:
If disabling was deliberate (e.g. it dropped too many tiles on your test data), please say so in a comment and delete 2. const int group = 256 / nBins;
cv::Mat out = cv::Mat::zeros(nBins, 1, CV_32F);
for (int i = 0; i < 256; ++i) q[i / group] += p[i];
3.
Medium4. They were global, whole-mask histogram comparisons; they're now pixel-weighted means of per-tile comparisons. Same names, different scale — a 50×50 tile has ~2500 pixels over 32 bins, so per-tile Bhattacharyya carries far more small-sample noise than the global value did, and numbers won't be comparable to anything reported by 0.3.0. 5. The full tiled pass runs twice and 2/3 of its output is discarded —
6. No validation of image type or size — The header comment promises 7. Dead code left behind by the port
8. Internal symbols should have internal linkage —
9. Six commented-out 10. Two drop reasons share one counter — Low / polish11. Clamping negative SSIM to 0 discards the most informative signal — tmp[tmp < 0] <- 0SSIM ∈ [-1, 1], and negative values (structural anti-correlation) are precisely the strongest evidence of a bad local alignment — collapsing them into "same as mediocre" hides that in the Local SSIM tab. A diverging scale over [-1, 1] would read better. (The NaN tiles are handled correctly, incidentally: 12. Stale naming/comments. 13. Document the SSIM variant. This is per-tile global SSIM with population (÷n) variance/covariance, not the 11×11 Gaussian-windowed, sample-variance (÷n−1) SSIM of Wang et al. Both choices are self-consistent and defensible, but the numbers won't match 14. Unrelated churn in 15. No tests. There's no coverage for the new metric anywhere under SummaryThe approach is sound and the map dimensions stay compatible with what I reviewed only; no changes were pushed. |
|
@claude check again |
No description provided.