fix compression after resizing in remote inference#33
Conversation
6d370e4 to
a4faee7
Compare
|
Hi Jianwen, |
No problem. I have rebased the code and solved the conflict. Thanks. |
|
Did you close it? I believe you address a bit more than what was done. |
|
Sorry. I intended to delete one comment and wrongly selected close the PR. |
|
@jianwensong , Thanks for the PR. |
|
@chyomin06 Thanks for the updates. That looks really good! The only issue is that this commit seems not work with Detectron2’s DatasetMapper (the one imported directly from detectron2, not the customized version in utils), which I believe also outputs images in BGR format. |
I think it should work since Detectron2 dataset mapper has the same property attribute, image_format. |
|
@chyomin06 I see. Thank you for the explanation. Yes, you are right. I will close this PR. |
While testing remote inference with
compress_after_resizingenabled, I found that the current implementation ignores the output of_org_mapper_func.The resized images should all be in RGB format to ensure correct YUV conversion. However, in both
YOLOXCustomMapper, Detectron2’sDatasetMapper, and MMPOSECustomMapper, the output of_org_mapper_funcis in BGR format. Therefore, using these outputs directly leads to incorrect colors whencompress_after_resizingis enabled. This PR provides a fix to this issue.In addition, a minor issue related to image-based remote inference when enablingCould you please review the fix? Thanks.compress_after_resizinghas been fixed. (f6d23ae has fixed this, the conflict has been solved)