Skip to content

Commit f69ee8f

Browse files
authored
Merge pull request spmallick#280 from pjspillai/yolo3_minor_cleanup
minor cleanup, removing C++ syntax from python file
2 parents 7c7e9d3 + 900e706 commit f69ee8f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ObjectDetection-YOLO/object_detection_yolo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
args = parser.parse_args()
2222

2323
# Load names of classes
24-
classesFile = "coco.names";
24+
classesFile = "coco.names"
2525
classes = None
2626
with open(classesFile, 'rt') as f:
2727
classes = f.read().rstrip('\n').split('\n')
2828

2929
# 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"
3232

3333
net = cv.dnn.readNetFromDarknet(modelConfiguration, modelWeights)
3434
net.setPreferableBackend(cv.dnn.DNN_BACKEND_OPENCV)
@@ -157,7 +157,7 @@ def postprocess(frame, outs):
157157

158158
# Write the frame with the detection boxes
159159
if (args.image):
160-
cv.imwrite(outputFile, frame.astype(np.uint8));
160+
cv.imwrite(outputFile, frame.astype(np.uint8))
161161
else:
162162
vid_writer.write(frame.astype(np.uint8))
163163

0 commit comments

Comments
 (0)