Skip to content

Commit

Permalink
style: format
Browse files Browse the repository at this point in the history
  • Loading branch information
Mala1180 authored and kelvin-olaiya committed Sep 21, 2024
1 parent 22be9b7 commit bc9df42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion alarm/src/application/services/impl/AlarmServiceImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ export class AlarmServiceImpl implements AlarmService {

private async checkIntrusion(detection: Detection): Promise<IntrusionRule | undefined> {
return this.getActiveIntrusionRules().then(rules =>
rules.find(rule => rule.activeOn === detection.sourceDeviceId && rule.objectClass === detection.objectClass)
rules.find(
rule => rule.activeOn === detection.sourceDeviceId && rule.objectClass === detection.objectClass
)
)
}

Expand Down
3 changes: 2 additions & 1 deletion recognition/app/application/Recognizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def __init__(self, camera_code: str, rtsp_stream_url: str):
self._recognized_objects: [str] = []
if ENV != "test":
self._net = cv.dnn_DetectionModel(
os.path.abspath(f"{yolo_resource}/yolov3.weights"), os.path.abspath(f"{yolo_resource}/yolov3.cfg")
os.path.abspath(f"{yolo_resource}/yolov3.weights"),
os.path.abspath(f"{yolo_resource}/yolov3.cfg"),
)
self._net.setInputSize(320, 320)
self._net.setInputScale(1.0 / 255)
Expand Down

0 comments on commit bc9df42

Please sign in to comment.