Skip to content

Commit

Permalink
Add objectdetection_model, object_threshold, nms_threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Jan 31, 2025
1 parent d25237d commit bbbead6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
3 changes: 3 additions & 0 deletions web/includes/Monitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ public static function getStateString($option) {
'AnalysisSource' => 'Primary',
'AnalysisImage' => 'FullColour',
'ObjectDetection' => 'None',
'ObjectDetectionModel' => '',
'ObjectDetectionObjectThreshold' => '0.4',
'ObjectDetectionNMSThreshold' => '0.25',
'Enabled' => array('type'=>'boolean','default'=>1),
'Decoding' => 'Always',
'RTSP2WebEnabled' => array('type'=>'integer','default'=>0),
Expand Down
18 changes: 15 additions & 3 deletions web/skins/classic/views/monitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1063,13 +1063,25 @@ class="nav-link<?php echo $tab == $name ? ' active' : '' ?>"
<input type="text" name="newMonitor[LinkedMonitors]" value="<?php echo $monitor->LinkedMonitors() ?>" data-on-input="updateLinkedMonitorsUI"/><br/>
<div id="LinkedMonitorsUI"></div>
</li>
<li class="ObjectDetection">
<label><?php echo translate('Object Detection')?></label>
<li class="ObjectDetection">
<label><?php echo translate('Object Detection')?></label>
<?php
echo htmlSelect('newMonitor[ObjectDetection]', ['none'=>'None', 'quadra'=>'NetInt Quadra', 'speedai'=>'Untether SpeedAI'],
$monitor->ObjectDetection());
?>
</li>
</li>
<li class="ObjectDetectionModel">
<label><?php echo translate('Object Detection Model')?></label>
<input type="text" name="newMonitor[ObjectDetectionModel]" value="<?php echo validHtmlStr($monitor->ObjectDetectionModel()) ?>" />
</li>
<li class="ObjectDetectionObjectThreshold">
<label><?php echo translate('Object Detection Object Threshold')?></label>
<input type="number" name="newMonitor[ObjectDetectionObjectThreshold]" value="<?php echo validHtmlStr($monitor->ObjectDetectionObjectThreshold()) ?>" min="0" step="any" max="100"/>
</li>
<li class="ObjectDetectionNMSThreshold">
<label><?php echo translate('Object Detection NMS Threshold')?></label>
<input type="number" name="newMonitor[ObjectDetectionNMSThreshold]" value="<?php echo validHtmlStr($monitor->ObjectDetectionNMSThreshold()) ?>" min="0" step="any" max="100"/>
</li>
<?php
}
break;
Expand Down

0 comments on commit bbbead6

Please sign in to comment.