1、边沿图片的数据处理
如图这种处于临界的图片就不需要处理,不是好素材。
2、模糊样本舍弃
3、重叠率大于30%舍弃
4、数据处理一些小技巧
import cv2
import os
import json
from tqdm import tqdm
imgs_path = [r"C:\Users\9ling\Desktop\ATM\original_imgs\0096418706418705fcda8240ae034d0a968e02858f58bb00.jpg",
r"C:\Users\9ling\Desktop\ATM\original_imgs\00963525013524979d84cd0683404cea904b9e8878539c98.jpg",
r"C:\Users\9ling\Desktop\ATM\original_imgs\00960085560085544386d0f9fc69406d8101f4696a25e32a.jpg",
r"C:\Users\9ling\Desktop\ATM\original_imgs\00960840310840305e229d2259b8468882f7900666a66aaa.jpg"]
i = 11
for i_path in tqdm(imgs_path):
im = cv2.imread(i_path, 1)
for j in range(50):
cv2.imwrite(os.path.join(("\\").join(i_path.split("\\")[:-2]), "site_falsedetectmake1119_02",
str(i * 100 + j) + ".jpg"), im)
i += 1