feat: 设置面板分组整理 + 人员时间精确到秒
This commit is contained in:
@@ -472,8 +472,8 @@ function loadPersonsList() {
|
||||
var item = document.createElement('div');
|
||||
item.className = 'person-item';
|
||||
|
||||
var firstSeen = new Date(person.first_seen).toLocaleDateString();
|
||||
var lastSeen = new Date(person.last_seen).toLocaleDateString();
|
||||
var firstSeen = new Date(person.first_seen).toLocaleString();
|
||||
var lastSeen = new Date(person.last_seen).toLocaleString();
|
||||
|
||||
item.innerHTML = '<div class="person-info">' +
|
||||
'<span class="person-name">' + person.name + '</span>' +
|
||||
@@ -537,15 +537,19 @@ function loadSettingsForm() {
|
||||
document.getElementById('setting-display-limit').value = config.display_limit || 20;
|
||||
document.getElementById('setting-refresh-interval').value = config.refresh_interval || 5;
|
||||
|
||||
// Detection algorithm settings
|
||||
// Person Detection (YOLO)
|
||||
document.getElementById('setting-use-yolo').checked = config.use_yolo !== false;
|
||||
document.getElementById('setting-use-mediapipe').checked = config.use_mediapipe_face !== false;
|
||||
document.getElementById('setting-use-haar').checked = config.use_haar_cascade === true;
|
||||
document.getElementById('setting-use-face-rec').checked = config.use_face_recognition !== false;
|
||||
document.getElementById('setting-yolo-confidence').value = config.yolo_min_confidence || 0.3;
|
||||
|
||||
// Confirmation settings
|
||||
// Person Identification
|
||||
document.getElementById('setting-use-face-rec').checked = config.use_face_recognition !== false;
|
||||
document.getElementById('setting-use-mediapipe').checked = config.use_mediapipe_face !== false;
|
||||
document.getElementById('setting-use-color-hist').checked = config.use_color_histogram !== false;
|
||||
document.getElementById('setting-match-threshold').value = config.face_match_threshold || 0.6;
|
||||
|
||||
// Confirmation Settings
|
||||
document.getElementById('setting-confirm-frames').value = config.confirm_frames || 3;
|
||||
document.getElementById('setting-min-confidence').value = config.min_detection_confidence || 0.3;
|
||||
document.getElementById('setting-leave-frames').value = config.leave_frames || 2;
|
||||
|
||||
// Vision API settings
|
||||
document.getElementById('setting-use-vision-api').checked = config.use_vision_api === true;
|
||||
@@ -568,15 +572,19 @@ function saveSettings() {
|
||||
display_limit: parseInt(document.getElementById('setting-display-limit').value),
|
||||
refresh_interval: parseInt(document.getElementById('setting-refresh-interval').value),
|
||||
|
||||
// Detection algorithms
|
||||
// Person Detection (YOLO)
|
||||
use_yolo: document.getElementById('setting-use-yolo').checked,
|
||||
use_haar_cascade: document.getElementById('setting-use-haar').checked,
|
||||
use_mediapipe_face: document.getElementById('setting-use-mediapipe').checked,
|
||||
use_face_recognition: document.getElementById('setting-use-face-rec').checked,
|
||||
yolo_min_confidence: parseFloat(document.getElementById('setting-yolo-confidence').value),
|
||||
|
||||
// Confirmation settings
|
||||
// Person Identification
|
||||
use_face_recognition: document.getElementById('setting-use-face-rec').checked,
|
||||
use_mediapipe_face: document.getElementById('setting-use-mediapipe').checked,
|
||||
use_color_histogram: document.getElementById('setting-use-color-hist').checked,
|
||||
face_match_threshold: parseFloat(document.getElementById('setting-match-threshold').value),
|
||||
|
||||
// Confirmation Settings
|
||||
confirm_frames: parseInt(document.getElementById('setting-confirm-frames').value),
|
||||
min_detection_confidence: parseFloat(document.getElementById('setting-min-confidence').value),
|
||||
leave_frames: parseInt(document.getElementById('setting-leave-frames').value),
|
||||
|
||||
// Vision API
|
||||
use_vision_api: document.getElementById('setting-use-vision-api').checked,
|
||||
|
||||
@@ -138,40 +138,59 @@
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h4>Detection Algorithms</h4>
|
||||
<h4>👤 Person Detection (YOLO)</h4>
|
||||
<div class="setting-item">
|
||||
<label>YOLO (Most Accurate):</label>
|
||||
<label>Enable YOLO:</label>
|
||||
<input type="checkbox" id="setting-use-yolo" checked>
|
||||
<span class="setting-desc">YOLOv8 nano - Best accuracy</span>
|
||||
<span class="setting-desc">Human body detection</span>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<label>MediaPipe Face:</label>
|
||||
<input type="checkbox" id="setting-use-mediapipe" checked>
|
||||
<span class="setting-desc">High precision face detection</span>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<label>Haar Cascade Body:</label>
|
||||
<input type="checkbox" id="setting-use-haar">
|
||||
<span class="setting-desc">Traditional body detection (backup)</span>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<label>Face Recognition:</label>
|
||||
<input type="checkbox" id="setting-use-face-rec" checked>
|
||||
<span class="setting-desc">Identify same person</span>
|
||||
<label>Min Confidence:</label>
|
||||
<input type="number" id="setting-yolo-confidence" value="0.3" min="0.1" max="1" step="0.1">
|
||||
<span class="setting-desc">Detection threshold (lower = more sensitive)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h4>Confirmation Settings</h4>
|
||||
<h4>🔍 Person Identification</h4>
|
||||
<div class="setting-item">
|
||||
<label>Face Recognition:</label>
|
||||
<input type="checkbox" id="setting-use-face-rec" checked>
|
||||
<span class="setting-desc">Best accuracy (requires dlib)</span>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<label>MediaPipe Face:</label>
|
||||
<input type="checkbox" id="setting-use-mediapipe" checked>
|
||||
<span class="setting-desc">Face landmarks detection</span>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<label>Color Histogram:</label>
|
||||
<input type="checkbox" id="setting-use-color-hist" checked>
|
||||
<span class="setting-desc">Backup method</span>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<label>Match Threshold:</label>
|
||||
<input type="number" id="setting-match-threshold" value="0.6" min="0.1" max="1" step="0.1">
|
||||
<span class="setting-desc">Lower = stricter matching</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h4>✅ Confirmation Settings</h4>
|
||||
<div class="setting-item">
|
||||
<label>Confirm Frames:</label>
|
||||
<input type="number" id="setting-confirm-frames" value="3" min="1" max="10">
|
||||
<span class="setting-desc">Frames to confirm detection</span>
|
||||
<span class="setting-desc">Frames to confirm change</span>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<label>Min Confidence:</label>
|
||||
<input type="number" id="setting-min-confidence" value="0.3" min="0.1" max="1" step="0.1">
|
||||
<span class="setting-desc">Detection confidence threshold</span>
|
||||
<label>Leave Frames:</label>
|
||||
<input type="number" id="setting-leave-frames" value="2" min="1" max="10">
|
||||
<span class="setting-desc">Frames to confirm leaving</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h4>🤖 AI Analysis</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user