Open 184338740 opened 3 years ago
What`s more Config file, cfg.py:
Cfg.width = 608 # width = 320 + 96 * m, m in {0, 1, 2, 3, ...}
Cfg.height = 608 # height = 320 + 96 * n, n in {0, 1, 2, 3, ...}
Cfg.w = Cfg.width
Cfg.h = Cfg.height
Image read file, dataset.py:
class Yolo_dataset(Dataset):
self.cfg = cfg
ai = image_data_augmentation(img, self.cfg.w, self.cfg.h, pleft, ptop, swidth, sheight, flip, dhue, dsat, dexp, gaussian_noise, blur, truth)
Image Augmentation file where resize, dataset.py:
def image_data_augmentation(mat, w, h, pleft, ptop, swidth, sheight, flip, dhue, dsat, dexp, gaussian_noise, blur,truth):
img = mat
sized = cv2.resize(img, (w, h), cv2.INTER_LINEAR)
Train file train.py:
The output view to (fsize, fsize), such as (13,13) resolution. Yolo_loss function may just run for square input?