File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed
Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments