Skip to content

Commit

Permalink
minor cleanup, removing C++ syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
pjspillai committed Mar 14, 2019
1 parent 3c484a6 commit 900e706
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ObjectDetection-YOLO/object_detection_yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
args = parser.parse_args()

# Load names of classes
classesFile = "coco.names";
classesFile = "coco.names"
classes = None
with open(classesFile, 'rt') as f:
classes = f.read().rstrip('\n').split('\n')

# Give the configuration and weight files for the model and load the network using them.
modelConfiguration = "yolov3.cfg";
modelWeights = "yolov3.weights";
modelConfiguration = "yolov3.cfg"
modelWeights = "yolov3.weights"

net = cv.dnn.readNetFromDarknet(modelConfiguration, modelWeights)
net.setPreferableBackend(cv.dnn.DNN_BACKEND_OPENCV)
Expand Down Expand Up @@ -157,7 +157,7 @@ def postprocess(frame, outs):

# Write the frame with the detection boxes
if (args.image):
cv.imwrite(outputFile, frame.astype(np.uint8));
cv.imwrite(outputFile, frame.astype(np.uint8))
else:
vid_writer.write(frame.astype(np.uint8))

Expand Down

0 comments on commit 900e706

Please sign in to comment.