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

[Feature] utilize mmcv image backend #7067

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

fcakyon
Copy link
Contributor

@fcakyon fcakyon commented Jan 23, 2022

Currently LoadImageFromFile pipeline doesnt support loading mmcv image backends as pillow,tifffile... but mmcv supports it.

This PR adds the support of using other mmcv image backends.

@fcakyon fcakyon changed the title add mmcv image backend support add tiff image loading support Jan 23, 2022
@codecov
Copy link

codecov bot commented Jan 23, 2022

Codecov Report

Patch coverage is 100.00% of modified lines.

Files Changed Coverage
mmdet/datasets/pipelines/loading.py 100.00%

📢 Thoughts on this report? Let us know!.

@fcakyon fcakyon changed the title add tiff image loading support [Feature] add tiff image loading support Jan 23, 2022
@fcakyon fcakyon changed the title [Feature] add tiff image loading support [Feature] utilize mmcv image backend Jan 23, 2022
@BIGWangYuDong BIGWangYuDong self-requested a review January 25, 2022 12:34
"""

def __init__(self,
to_float32=False,
color_type='color',
file_client_args=dict(backend='disk')):
file_client_args=dict(backend='disk'),
image_backend=None):
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is suggested to set imdecode_backend = 'cv2' as default

mmdet/datasets/pipelines/loading.py Show resolved Hide resolved
@RangiLyu RangiLyu added the enhancement New feature or request label Jan 25, 2022
@RangiLyu RangiLyu added this to In progress in Improvements via automation Jan 25, 2022
@RangiLyu RangiLyu moved this from In progress to Review in progress in Improvements Jan 25, 2022
@ZwwWayne
Copy link
Collaborator

Hi @fcakyon ,
Thanks for your kind PR. We plan to merge this PR this month, do you have time to continue on this?

@ZwwWayne ZwwWayne changed the base branch from master to dev February 10, 2022 07:50
@fcakyon
Copy link
Contributor Author

fcakyon commented Feb 10, 2022

Hi @fcakyon , Thanks for your kind PR. We plan to merge this PR this month, do you have time to continue on this?

unfortunately i cannot fix the pre-commit error

@JingweiZhang12
Copy link
Collaborator

JingweiZhang12 commented Feb 11, 2022

Maybe you should also add some code in init function:
if self.image_backend is not None: mmcv.use_backend(self.image_backend)
if not, you can not use turbojpeg as backend.
jpeg

However, now, using turbojpeg as backend may have a potiential bug in distributing training and test as pointed in jpeg is None

@hhaAndroid
Copy link
Collaborator

@fcakyon Do you have any progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Improvements
Review in progress
Development

Successfully merging this pull request may close these issues.

None yet

6 participants