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

GoCV decoder skipped some JPEG image in imageloader #348

Closed
Yancey1989 opened this issue Sep 21, 2020 · 2 comments
Closed

GoCV decoder skipped some JPEG image in imageloader #348

Yancey1989 opened this issue Sep 21, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@Yancey1989
Copy link
Collaborator

Add one line code in imageloader.go, I found some JPEG images can not be decoded:

--- a/vision/imageloader/imageloader.go
+++ b/vision/imageloader/imageloader.go
@@ -115,6 +115,7 @@ func (p *ImageLoader) read() {
                        break
                }
                if m.Empty() {
+                       log.Printf("skip file: %s\n", hdr.Name)
                        continue
                }
                if p.colorSpace == RGB {
2020/09/21 20:07:18 skip file: ./train/n04523525/n04523525_186.JPEG
2020/09/21 20:07:19 skip file: ./train/n03877845/n03877845_9128.JPEG
2020/09/21 20:07:19 skip file: ./train/n03196217/n03196217_5255.JPEG
2020/09/21 20:07:19 skip file: ./train/n10148035/n10148035_24837.JPEG
2020/09/21 20:07:19 skip file: ./train/n09468604/n09468604_9453.JPEG
2020/09/21 20:07:19 skip file: ./train/n01843383/n01843383_4061.JPEG
2020/09/21 20:07:19 skip file: ./train/n03388549/n03388549_10331.JPEG
2020/09/21 20:07:19 skip file: ./train/n03721384/n03721384_8410.JPEG
@Yancey1989 Yancey1989 added the bug Something isn't working label Sep 21, 2020
@Yancey1989 Yancey1989 changed the title GoCV skipped some JPEG image in imageloader GoCV decoder skipped some JPEG image in imageloader Sep 21, 2020
@QiJune
Copy link
Collaborator

QiJune commented Sep 21, 2020

@QiJune
Copy link
Collaborator

QiJune commented Sep 22, 2020

Fixed by #349

@QiJune QiJune closed this as completed Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants