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

Fixing graph visualization #108

Merged
merged 4 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/data_gradients/config/detection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ report_sections:
- DetectionClassesPerImageCount
- DetectionBoundingBoxIoU:
num_bins: 10
class_agnostic: true
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def update(self, sample: DetectionSample):
def aggregate(self) -> Feature:
df = pd.DataFrame(self.data)

max_area = min(100, df["relative_bbox_area"].max())
plot_options = ViolinPlotOptions(
x_label_key="relative_bbox_area",
x_label_name="Bounding Box Area (in % of image)",
Expand All @@ -40,6 +41,7 @@ def aggregate(self) -> Feature:
title=self.title,
x_ticks_rotation=None,
labels_key="split",
x_lim=(0, max_area),
bandwidth=0.4,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DetectionBoundingBoxIoU(AbstractFeatureExtractor):
"""Feature Extractor to compute the pairwise IoU of bounding boxes per image.
This feature extractor helps to identify duplicate/highly overlapping bounding boxes."""

def __init__(self, num_bins: int = 10, class_agnostic: bool = False):
def __init__(self, num_bins: int = 10, class_agnostic: bool = True):
"""
:param num_bins: Number of bins to use for the heatmap plot.
:param class_agnostic: If True, only check IoU of bounding boxes of the same class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def aggregate(self) -> Feature:
kde=False,
labels_key="split",
individual_plots_key="split",
stat="percent",
x_ticks_rotation=None,
sharey=True,
labels_palette=LABELS_PALETTE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def aggregate(self) -> Feature:
y_label_name="Class Names",
order_key="class_id",
title=self.title,
x_lim=(0, df_class_count["n_appearance"].max() * 1.2),
bandwidth=0.4,
x_ticks_rotation=None,
labels_key="split",
Expand Down