|
@@ -40,6 +40,7 @@ def cut_small_images(image_path, mask_path, pic_target='./result_class/'):
|
|
|
num_length = int(length / cut_length)
|
|
|
# for循环迭代生成
|
|
|
lines_list = []
|
|
|
+ print(image_path)
|
|
|
for i in range(0, num_width):
|
|
|
for j in range(0, num_length):
|
|
|
im = image[i * cut_width: (i + 1) * cut_width, j * cut_length: (j + 1) * cut_length, :]
|
|
@@ -66,8 +67,8 @@ def cut_small_images(image_path, mask_path, pic_target='./result_class/'):
|
|
|
cv2.imwrite(result_path, im)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
- masks_dir_path = './data1/mask'
|
|
|
- images_dir_path = './data1/images'
|
|
|
+ masks_dir_path = './data/mask'
|
|
|
+ images_dir_path = './data/images'
|
|
|
# masks_dir_path = './data/test/mask'
|
|
|
# images_dir_path = './data/fire'
|
|
|
images_list_path = os.listdir(images_dir_path)
|