Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cv2
- import tools as tl
- import numpy as np
- data_file = "Dataset"
- file = open("./"+data_file+"/input_seg.txt", 'r')
- # Enter your name
- out_file = open("./results/Artur_Abdalimov_KBTU.txt", 'w')
- for line in file:
- if ".jpg" in line:
- imgPath = "./"+data_file+"/" + line[:-1]
- img = cv2.imread(imgPath)
- line1 = line
- else:
- cords = line[:-1].split(" ")
- y1 = int(cords[0])
- x1 = int(cords[1])
- y2 = int(cords[2])
- x2 = int(cords[3])
- out_file.write(line1)
- out_file.write(line)
- ###################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement