Tencent / ObjectDetection-OneStageDet

单阶段通用目标检测器

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dataloader _preprocessing.py _voc_train.py

pzxdd opened this issue · comments

commented

在_voc_train.py中有如下的代码:

rf = data.transform.RandomFlip(flip) rc = data.transform.RandomCropLetterbox(self, jitter) hsv = data.transform.HSVShift(hue, sat, val)

其中
rc = data.transform.RandomCropLetterbox(self, jitter)

在_preprocessing.py 中有RandomCropLetterbox的定义。这个类具体的实现逻辑是什么?是将原来lightnet的 RandomCrop和Letterbox相互结合吗?
下面这两行代码具体是什么任务呢?

new_ar = float(orig_w + random.randint(-dw, dw)) / (orig_h + random.randint(-dh, dh))
scale = random.random()*(2-0.25) + 0.25