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

Crash when using the Biologically-inspired dataset split #180

Open
rronan26 opened this issue Feb 24, 2025 · 0 comments
Open

Crash when using the Biologically-inspired dataset split #180

rronan26 opened this issue Feb 24, 2025 · 0 comments

Comments

@rronan26
Copy link

Hello,

Taglab is crashing when I attempt to export a new training dataset using the "Biologically-inspired dataset split" option.

Here's the error:

Traceback (most recent call last):
File "C:\Users\Admin\Desktop\TagLab-main\taglab.py", line 5016, in exportNewDataset
new_dataset.setupAreas(mode.upper(), target_classes)
File "C:\Users\Admin\Desktop\TagLab-main\source\NewDataset.py", line 667, in setupAreas
val_area, test_area = self.findAreas(target_classes=target_classes)
File "C:\Users\Admin\Desktop\TagLab-main\source\NewDataset.py", line 397, in findAreas
landscape_number, landscape_coverage, landscape_PSCV = self.calculateMetrics([0, 0, map_w, map_h], target_classes)
File "C:\Users\Admin\Desktop\TagLab-main\source\NewDataset.py", line 291, in calculateMetrics
if self.frequencies[key] > 0.0:
KeyError: (0, 'Background')

It seems to be an error with the "Background" class. I was sure to only include classes which were within the section of the image that was exported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant