The VisualizationDemo converts input image color from BGR to RGB before invoking DefaultPredictor.__call__:
|
# Convert image from OpenCV BGR format to Matplotlib RGB format. |
|
image = image[:, :, ::-1] |
But the DefaultPredictor.__call__ converts the color format again:
|
if self.input_format == "RGB": |
|
# whether the model expects BGR inputs or RGB |
|
original_image = original_image[:, :, ::-1] |
It may cause worse performance compared to the huggingface demo.
Possible related issues: #115
The
VisualizationDemoconverts input image color from BGR to RGB before invokingDefaultPredictor.__call__:OneFormer/demo/predictor.py
Lines 52 to 53 in 4962ef6
But the
DefaultPredictor.__call__converts the color format again:OneFormer/demo/defaults.py
Lines 71 to 73 in 4962ef6
It may cause worse performance compared to the huggingface demo.
Possible related issues: #115