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

Dataloader add jpeg support? #50

Open
crapthings opened this issue Jul 3, 2024 · 1 comment
Open

Dataloader add jpeg support? #50

crapthings opened this issue Jul 3, 2024 · 1 comment

Comments

@crapthings
Copy link

crapthings commented Jul 3, 2024

i get this error
assert len(self.images) == len(self.gts)

It seems that if the folder contains both .jpg and .jpeg file types, it can lead to errors.

images = [os.path.join(image_root, f) for f in os.listdir(image_root) if f.lower().endswith(('.jpg', '.png'))]

images = [os.path.join(image_root, f) for f in os.listdir(image_root) if f.lower().endswith(('.jpg', '.png'))]
            images = sort(images)
            
            gts = [os.path.join(gt_root, f) for f in os.listdir(gt_root) if f.lower().endswith(('.jpg', '.png'))]
            gts = sort(gts)

https://github.com/plemeri/InSPyReNet/blob/786341020846a220fb9e3f6fcda810b58d52b50a/data/dataloader.py#L80C13-L80C125

self.images = [os.path.join(root, f) for f in os.listdir(root) if f.lower().endswith(('.jpg', '.png', '.jpeg'))]
@plemeri
Copy link
Owner

plemeri commented Aug 23, 2024

Hi @crapthings, if it is still a problem, I'll update the dataloader for you. Please let me know.

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

2 participants