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

Crashing Analyzing Dataset Folder #122

Open
recyclerjh opened this issue Oct 24, 2023 · 11 comments
Open

Crashing Analyzing Dataset Folder #122

recyclerjh opened this issue Oct 24, 2023 · 11 comments

Comments

@recyclerjh
Copy link

I have created and exported a training set.
I was then able to export the dataset after making the necessary changes to line 213 with
qimage_cropped = qimage_map.copy(int(left), int(top), int(w), int(h))

I now am getting an error when I try to train the and it says the data set will be analyzed I get this
Traceback (most recent call last):
File "C:\Program Files\TagLab\source\QtTYNWidget.py", line 200, in chooseDatasetFolder
self.analyzeDataset()
File "C:\Program Files\TagLab\source\QtTYNWidget.py", line 373, in analyzeDataset
target_classes, freq_classes = CoralsDataset.importClassesFromDataset(labels_folder, self.project_labels)
File "C:\Program Files\TagLab\models\coral_dataset.py", line 315, in importClassesFromDataset
dict_freq[key] = float(dict_freq[key]) / float(total_pixels)
ZeroDivisionError: float division by zero

Suggestions?

@recyclerjh
Copy link
Author

I am excited to try to train my network but still having trouble. Any suggestions on what to do so it won't crash?

@maxcorsini
Copy link
Member

Dear recyclejh,

This error is caused by the fact that the total_pixels is zero. This sounds strange. Are you sure that the dataset is loaded in a corrected way ? Please, give me more details about how you are proceeding to train the network, to try to better understand what happen.

Best,
Massimiliano

@recyclerjh
Copy link
Author

recyclerjh commented Nov 9, 2023 via email

@Nicktmss
Copy link

Heyy there!!

I happen to be encountering the exact same issue. When I try to train my network a prompt appears saying it may take several minutes and then Taglab crashes with the exact same error.

It would be extremely helpful if someone had a fix to this problem.

Cheers!
Nikhil

@maxcorsini
Copy link
Member

maxcorsini commented Nov 17, 2023

Dear recyclerjh,

the reason of the crash is that the training folder is empty. How much is the resolution of your orthoimage and of the export area ?

@Nicktmss
Copy link

Dear Maxcorsini,

I am bumping into the same issue where my training data folder is empty. I uploaded both the orthomosaic and dem files. My resolution is 1mm pixel size and dimensions 566x530. The area to export in this case was 8,15,558,515.

At the same time both the test and the validation folders have images and labels.

Cheers!
Nikhil

@maxcorsini
Copy link
Member

maxcorsini commented Nov 17, 2023 via email

@recyclerjh
Copy link
Author

recyclerjh commented Nov 17, 2023 via email

@maxcorsini
Copy link
Member

Hi recyclerjh,

I do not understand your last comment. TagLab supports images of size 32767 x 32767 . So, you do not need to scale down an orthoimage of 30000 x 21000 pixels.

REgarding the problem with the empty training set, in your case the problem is not the image resolution. Please, check the size of the export area used (that may not coincide with the working area).

Best

@recyclerjh
Copy link
Author

recyclerjh commented Nov 18, 2023 via email

@maxcorsini
Copy link
Member

Hi recyclerjh,

the size of your map is ok. If also the export area is correct let's check if the problem is the target resolution vs the current resolution. You say that the scale of your map is 1.5 cm / pixel. What is the target resolution entered ?

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

3 participants