-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Bug] Fix image read error #3377
Conversation
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.
有逻辑需要修改。
if img is None: | ||
raise ValueError('Can\'t read The image file {}!'.format(data['img'])) | ||
data['img'] = img.astype('float32') |
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.
这个修改会导致一个不兼容问题,目前eg1800和supervisely在调用compose时传入的是传入image,而不是string,因此这样修改会导致漏掉对image的判None操作,建议:
- 同步修改eg1800和supervisely传入path而不是image。
- 加入assert指令保证img为string类型。
- 删除if isinstance(data['img'], str)
从而所有传入的都是sting,并在加载string后进行判断是否None,不为None则astype。
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.
eg1800和supervisely的逻辑似乎不太方便修改为只传入string,因此多加了一个判断
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.
LGTM
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.
LGTM
PR types
Bug fixes
PR changes
Others
Description
fix #3376