diff --git a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/utils.py b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/utils.py index a5949a3977a1fb82e38930fa9c5f077d5eaf3798..22ca2bd41515cbfff1e5306bbf5aa84a8a248102 100644 --- a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/utils.py +++ b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/utils.py @@ -203,7 +203,7 @@ def draw_bbox(image, bboxes,liste_pos_car, CLASSES=YOLO_COCO_CLASSES, show_label #Determination de la position de la voiture #speed with 10= 3.8/40 - pos_car, liste_pos_car_temp = get_position(bboxes, (previous_command[0]*3.7/170, previous_command[1]/200*35/360*2*3.1415, previous_command[2]), liste_pos_car.liste) + pos_car, liste_pos_car_temp, cone_x, cone_y = get_position(bboxes, (previous_command[0]*3.7/170, previous_command[1]/200*35/360*2*3.1415, previous_command[2]), liste_pos_car.liste) liste_pos_car.update_liste(liste_pos_car_temp) """Algorithme de conduite""" @@ -218,6 +218,9 @@ def draw_bbox(image, bboxes,liste_pos_car, CLASSES=YOLO_COCO_CLASSES, show_label track = Polygon(track_points) plt.plot(x_car, y_car,'+') + for x,y in zip(cone_x, cone_y): + x, y= (x-1.23855)/2.4+1, (y-0.889)/2.4+0.5 + plt.plot(x,y,'*') plt.plot([i for i,j in track_points], [j for i,j in track_points]) plt.show()