Skip to content

Car detection

NotGayBut5CentsAre5Cents edited this page Jun 7, 2018 · 2 revisions

Uses a predefined model from tensorflow, for image clasification.

The function we use from the file car_detection.py is get_object(screen). (we should probably rename the function to get_detected_cars_bboxes() as it describes better what this function does)

In output_dict we save all the information for the detected objects classified from tensorflows model.

then we append all the objects that are cars with above 50% certainty to a lsit

(the magic number is 3 here as from the tensorflow documentation, this is the class number for a car)

for i, dc in enumerate(output_dict['detection_classes']):
    if dc == 3:
    .
    .
    .

and the function returns the list

Clone this wiki locally