Set confidence threshold to 80% and remove slider from frontend

 Frontend Changes:
- Removed confidence threshold slider from web interface
- Added fixed 80% confidence display with green info box
- Updated JavaScript to use fixed 0.8 threshold
- Removed slider-related CSS styles

 Backend Changes:
- Updated all API endpoints to default to 80% confidence (0.8)
- Modified POST /detect, GET /detect/hardcoded, POST /detect/base64
- Updated comments to reflect new default threshold

 Testing Updates:
- Updated test_api.py to use 80% confidence for all tests
- Ensures consistent testing with new threshold

 Benefits:
- High precision mode (80% confidence) reduces false positives
- Simplified user interface without threshold adjustment
- Consistent detection behavior across all endpoints
This commit is contained in:
Aherobo Ovie Victor
2025-07-11 20:47:04 +01:00
parent c4de90fbec
commit 26a6f6f625
6 changed files with 31 additions and 40 deletions
+2 -3
View File
@@ -58,9 +58,8 @@
</div>
<div class="upload-controls" style="display: none;" id="uploadControls">
<div class="confidence-control">
<label for="confidenceSlider">Confidence Threshold: <span id="confidenceValue">0.5</span></label>
<input type="range" id="confidenceSlider" min="0.1" max="1.0" step="0.1" value="0.5">
<div class="confidence-info">
<p><strong>Confidence Threshold:</strong> 80% (High Precision Mode)</p>
</div>
<button class="btn btn-success" onclick="processUploadedImage()">
<i class="fas fa-search"></i> Detect Memory Modules