Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtools/dota_image_split.py bugs! #27

Open
PresageBoat opened this issue Jun 10, 2021 · 0 comments
Open

rtools/dota_image_split.py bugs! #27

PresageBoat opened this issue Jun 10, 2021 · 0 comments

Comments

@PresageBoat
Copy link

PresageBoat commented Jun 10, 2021

r3det-on-mmdetection/rtools/dota_image_split.py
Lines 64 to 69 in 5073df9

    def _split_single(self, image_id):
        hdr, objs = self._parse_annotation_single(image_id)
        image_dir = osp.join(self.in_images_dir, image_id + '.png')
        img = cv2.imread(image_dir)
        h, w, _ = img.shape
        w_ovr, h_ovr = self.tile_overlap
        w_s, h_s = self.tile_shape
        for h_off in range(0, max(1, h - h_ovr), h_s - h_ovr):
            if h_off > 0:
                h_off = min(h - h_s, h_off)  # h_off + hs <= h if h_off > 0
            for w_off in range(0, max(1, w - w_ovr), w_s - w_ovr):
                if w_off > 0:
                    w_off = min(w - w_s, w_off)  # w_off + ws <= w if w_off > 0

bug 描述:
当使用此脚本进行crop操作时,图像的最右侧和最下面会存在截取不到的现象,从而会引起训练样本中部分标注目标的丢失,影响训练。
如果bug得到确认和认可的话,我将提交一个修复的请求来修复此问题

@PresageBoat PresageBoat changed the title dota_image_split.py will not rtools/dota_image_split.py bugs! Jun 10, 2021
@PresageBoat PresageBoat reopened this Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant