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

consummating xml_style.py #2457

Merged
merged 3 commits into from
Apr 26, 2020
Merged

consummating xml_style.py #2457

merged 3 commits into from
Apr 26, 2020

Conversation

yuzhj
Copy link
Contributor

@yuzhj yuzhj commented Apr 15, 2020

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

@hellock
Copy link
Member

hellock commented Apr 16, 2020

Thanks for your contribution! Could you fix the linting errors?

height = int(size.find('height').text)
width = 0
height = 0
if size is None:
Copy link
Member

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
width = int(size.find('width').text)
height = int(size.find('height').text)
else:
imgname = osp.join(self.img_prefix, 'JPEGImages',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imgname -> img_path

imgname = osp.join(self.img_prefix, 'JPEGImages',
'{}.jpg'.format(img_id))
img = Image.open(imgname)
width,height = img.size
Copy link
Member

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.

Copy link
Contributor Author

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
@yuzhj yuzhj requested a review from hellock April 26, 2020 16:11
@hellock hellock merged commit c40cafb into open-mmlab:master Apr 26, 2020
hellock pushed a commit that referenced this pull request Apr 30, 2020
* 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>
mike112223 pushed a commit to mike112223/mmdetection that referenced this pull request Aug 25, 2020
* consummating xml_style.py

* Update xml_style.py

update xml_style.py

* Update xml_style.py

fix the format
liuhuiCNN pushed a commit to liuhuiCNN/mmdetection that referenced this pull request May 21, 2021
@OpenMMLab-Assistant-007
Copy link

Hi!
@yuzhj
First of all, we want to express our gratitude for your significant PR in the OpenMMLab project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR.

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:)
Thank you again for your contribution❤

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

Successfully merging this pull request may close these issues.

None yet

3 participants