Skip to content

Conversation

@ashwinvaidya17
Copy link
Contributor

Customisable Visualization

Adds layout on top of the method proposed in #233.
Ignore the labels overlayed on top of each other. I will fix that later.

Default Visualizer

class AnomalyResult(Result):
   ...
   @property
    def default_layout(self) -> Layout:
        return Flatten(
            Overlay,
            Polygon,
            Label,
        )
visualizer = Visualizer()
visualizer.save(image, anomaly_result, "anomaly_default_layout.jpg")

Result

image

Custom Visualizer

layout = HStack(Polygon, Label, Flatten(Overlay, BoundingBoxes))
visualizer = Visualizer(layout=layout)
visualizer.save(image, anomaly_result, "anomaly_custom_layout.jpg")

Result

image

@github-actions github-actions bot added the python python related changes label Nov 20, 2024
Copy link
Member

@sovrasov sovrasov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Ashwin! Overall looks good. I see some generalization issues (like missing labels for bboxes), but that can be addressed when covering more tasks. Please don't forget to add unit tests for the implementation.

self.y1 = y1
self.x2 = x2
self.y2 = y2
self.color = color
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In multiclass detection task bbox also has a label, and it looks like bbox primitive needs to have it as well

@sovrasov sovrasov closed this Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python python related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants