Skip to content

Commit e02bb73

Browse files
💄 Format code using isort and black
1 parent 87c70c0 commit e02bb73

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

mukh/detection/models/blazeface/blazeface_detector.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ def __init__(
4646
confidence_threshold: Minimum confidence threshold for detections
4747
"""
4848
super().__init__(confidence_threshold)
49-
49+
5050
# Use default paths from package if not provided
5151
if weights_path is None:
52-
weights_path = resource_filename('mukh', 'detection/models/blazeface/blazeface.pth')
52+
weights_path = resource_filename(
53+
"mukh", "detection/models/blazeface/blazeface.pth"
54+
)
5355
if anchors_path is None:
54-
anchors_path = resource_filename('mukh', 'detection/models/blazeface/anchors.npy')
56+
anchors_path = resource_filename(
57+
"mukh", "detection/models/blazeface/anchors.npy"
58+
)
5559

5660
self.device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
5761
self.net = BlazeFace().to(self.device)

mukh/detection/models/ultralight/ultralight_detector.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,15 @@ def __init__(
6060
"""
6161
super().__init__(confidence_threshold)
6262

63-
# Use default paths from package if not provided
63+
# Use default paths from package if not provided
6464
if weights_path is None:
65-
weights_path = resource_filename('mukh', 'detection/models/ultralight/pretrained/version-RFB-320.pth')
65+
weights_path = resource_filename(
66+
"mukh", "detection/models/ultralight/pretrained/version-RFB-320.pth"
67+
)
6668
if labels_path is None:
67-
labels_path = resource_filename('mukh', 'detection/models/ultralight/voc-model-labels.txt')
69+
labels_path = resource_filename(
70+
"mukh", "detection/models/ultralight/voc-model-labels.txt"
71+
)
6872

6973
self.device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
7074
self.input_size = input_size

0 commit comments

Comments
 (0)