Code/preprocess

Code/preprocess

draw_graph

막대그래프 import matplotlib.pyplot as plt import numpy as np # Data for plotting models = ['1', '2', '3', '4'] #model name metric = [0.561, 0.461, 0.69, 0.89] #metric x = np.arange(len(models)) # the label locations width = 0.35 # the width of the bars fig, ax = plt.subplots() rects1 = ax.bar(x, metric, width) # Add some text for labels, title and custom x-axis tick labels, etc. ax.set_ylabel('MOTA'..

Code/preprocess

NPY visualize

1. Img import numpy as np import matplotlib.pyplot as plt # 이미지 데이터를 NumPy 배열로 읽어옵니다. image_data = np.load('D:/K-Radar/dir_processed_img/img_driving_corridor/1/front_00002.npy') # 파일 경로를 적절하게 지정해야 합니다. # 이미지를 시각화합니다. plt.imshow(image_data, cmap='gray') # cmap을 원하는 색상 맵으로 변경할 수 있습니다. #plt.title('Image') plt.axis('off') # 축을 비활성화하여 이미지에 불필요한 눈금을 표시하지 않습니다. plt.show() 2. PCD import numpy as np impo..

Code/preprocess

pcd visualize

pcd 데이터 visualize code import open3d as o3d # PCD 파일을 읽어옵니다. pcd = o3d.io.read_point_cloud("파일 경로.pcd") # Point Cloud를 시각화합니다. o3d.visualization.draw_geometries([pcd])

Code/preprocess

img2video-opencv

img에서 video로 변환하는 code import os import cv2 pathIn= './result/' pathOut = './result/result.mp4' fps = 5 paths = os.listdir('./result/') frame_array = [] for idx , path in enumerate(paths) : path = os.path.join(pathIn + path) img = cv2.imread(path) height, width, layers = img.shape size = (width,height) frame_array.append(img) out = cv2.VideoWriter(pathOut,cv2.VideoWriter_fourcc(*'DIVX'), fps, si..

Shy_un
'Code/preprocess' 카테고리의 글 목록