Skip to content

Commit

Permalink
fix: Update class count aggregation to use totals from datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
rhoadesScholar committed Jan 10, 2025
1 parent 7cd0ed2 commit a995c07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cellmap_data/multidataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def class_counts(self) -> dict[str, float]:
class_counts.update({c + "_bg": 0.0 for c in self.classes})
for ds in self.datasets:
for c in self.classes:
if c in ds.class_counts:
if c in ds.class_counts["totals"]:
class_counts[c] += ds.class_counts["totals"][c]
class_counts[c + "_bg"] += ds.class_counts["totals"][c + "_bg"]
self._class_counts = class_counts
Expand Down

0 comments on commit a995c07

Please sign in to comment.