def test_random_walk_vert(self): tensor = np.zeros((8, 128, 265, 6), dtype=np.float32) width = 5 num_steps=300 tensor, pos, cars = random_walk(tensor, width, num_steps, horizontal=False) img_from_above = np.zeros((tensor.shape[1], tensor.shape[2], 3), dtype=np.uint8) img = view_2D(tensor, img_from_above, 0) fig = plt.figure plt.imshow(img) plt.show()
def test_random_walk_diagonal_neg(self): tensor = np.zeros((8, 128, 265, 6), dtype=np.float32) width = 5 num_steps = 300 tensor, pos, cars= random_walk(tensor, width, num_steps, diagonal=True, dir=-1) img_from_above = np.zeros((tensor.shape[1], tensor.shape[2], 3), dtype=np.uint8) img = view_2D(tensor, img_from_above, 0) fig = plt.figure plt.imshow(img) plt.show()
def test_one_path(self): tensor=np.zeros((8,128, 265,6), dtype=np.float32) width=5 num_crossings=2 # tensor, point_1, thetas, steps, cars tensor,point ,thetas, steps, cars=random_path(tensor, width, num_crossings) img_from_above=np.zeros((tensor.shape[1],tensor.shape[2],3), dtype=np.uint8) img=view_2D(tensor, img_from_above, 0) fig = plt.figure plt.imshow(img) plt.show()
people_rec, pos_x, pos_y, tensor, True, people_dict=ped_dict, car_dict=cars_dict, init_frames=init_frames, init_frames_cars=init_frames_cars, seq_len_pfnn=seq_len_pfnn) img_from_above = np.ones( (ep.reconstruction.shape[1], ep.reconstruction.shape[2], 3), dtype=np.uint8) * 255 img = view_2D(ep.reconstruction, img_from_above, 0) print("View PEDESTRIANS") img = view_pedestrians( 0, ep.people, img, 0, trans=.15, ) # tensor=ep.reconstruction) img = view_cars(img, ep.cars, img.shape[0], img.shape[1], 0, frame=0) # ,tensor=ep.reconstruction)