-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
consummating xml_style.py #2457
Conversation
Thanks for your contribution! Could you fix the linting errors? |
mmdet/datasets/xml_style.py
Outdated
height = int(size.find('height').text) | ||
width = 0 | ||
height = 0 | ||
if size is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may put if size is not None
first, since it is the more common case.
update xml_style.py
mmdet/datasets/xml_style.py
Outdated
width = int(size.find('width').text) | ||
height = int(size.find('height').text) | ||
else: | ||
imgname = osp.join(self.img_prefix, 'JPEGImages', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imgname -> img_path
mmdet/datasets/xml_style.py
Outdated
imgname = osp.join(self.img_prefix, 'JPEGImages', | ||
'{}.jpg'.format(img_id)) | ||
img = Image.open(imgname) | ||
width,height = img.size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the linting error. For the code style, you may refer to the contributing guide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done thanks
fix the format
* add dilation to conv_offset (#2507) * add dilation of conv_offset * Update deform_conv.py * consummating xml_style.py (#2457) * consummating xml_style.py * Update xml_style.py update xml_style.py * Update xml_style.py fix the format * enable self-defined OptimizerHook (#2500) Co-authored-by: z-bingo <z-bingo@outlook.com> Co-authored-by: vanpersie32 <18810388176@163.com> Co-authored-by: Gr4ph1c <31239926+Gr4ph1c@users.noreply.github.com> Co-authored-by: Bin Zhang <46709554+z-bingo@users.noreply.github.com> Co-authored-by: z-bingo <z-bingo@outlook.com>
* consummating xml_style.py * Update xml_style.py update xml_style.py * Update xml_style.py fix the format
Hi! We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us :https://discord.gg/UjgXkPWNqA If you have WeChat account,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:) |
During the training process, I found that some xml files may not have a size field, but the remaining content in these files is complete, so I think it is beneficial to consummate this file