File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 21
21
args = parser .parse_args ()
22
22
23
23
# Load names of classes
24
- classesFile = "coco.names" ;
24
+ classesFile = "coco.names"
25
25
classes = None
26
26
with open (classesFile , 'rt' ) as f :
27
27
classes = f .read ().rstrip ('\n ' ).split ('\n ' )
28
28
29
29
# Give the configuration and weight files for the model and load the network using them.
30
- modelConfiguration = "yolov3.cfg" ;
31
- modelWeights = "yolov3.weights" ;
30
+ modelConfiguration = "yolov3.cfg"
31
+ modelWeights = "yolov3.weights"
32
32
33
33
net = cv .dnn .readNetFromDarknet (modelConfiguration , modelWeights )
34
34
net .setPreferableBackend (cv .dnn .DNN_BACKEND_OPENCV )
@@ -157,7 +157,7 @@ def postprocess(frame, outs):
157
157
158
158
# Write the frame with the detection boxes
159
159
if (args .image ):
160
- cv .imwrite (outputFile , frame .astype (np .uint8 ));
160
+ cv .imwrite (outputFile , frame .astype (np .uint8 ))
161
161
else :
162
162
vid_writer .write (frame .astype (np .uint8 ))
163
163
You can’t perform that action at this time.
0 commit comments