I am trying to extract x and y values from a custom trained data set and I use Anaconda prompt. I somehow managed to get the x and y values printed on my Anaconda prompt but I don't know how to save them. I am using detect.py file when I added 2 lines to get the x and y values of my object. now I need to store them. How can this be done.
if save_img or view_img: # Add bbox to image
label = f'{names[int(cls)]} {conf:.2f}'
x1, y1, x2, y2 = [float(x) for x in xyxy]
plot_one_box(xyxy, im0, label=label, color=colors[int(cls)], line_thickness=1)
center_x = int((x1 + x2) / 2)
center_y = int((y1 + y2) / 2)
print(center_x,center_y)