Object Detection no results after training

Hi there,
I would like to train a model on my own data to detect animals. The model is doing the training but if i visualize a prediction after taining the picture of the prediction is black everywhere.
Before the training was running I got the error that the koordinate of my bounding boxes are not korrekt. xmin was higher than xmax. To solve that problem i check wether the xmin value is smaller than the xmax value. I noticed that I have a lot of values where xmin=xmax and ymin=ymax. Do you know why this happend?
Do you have any idea why my model does not predict anything?

If I ignore the error and do not check if the xmin value ist smaller than the xmax value, i can train the model until the error. If I do a prediction then, i get a prediction, which is not very nice, but I get something.
Thanks for your help.

There is a bug in the labelling process as per your message. Plot the data before training to see if the bounding boxes are correct without using any if checks.

How do I print my picture with the boxes?

Use matplotlib. Draw lines between (xmin,ymin) and (xmax,ymax).

Thanks, now i plotted my masks. I can see a problem now: I get too many bounding boyes. I get abaout 100 bounding boxes on a picture with just 2 Objects. What can be the problem of this issue?

To be on the same page, did you plot the masks as the output of your model, or to test your dataloader?

If you plotted the masks to check the result of your dataloader, then it means that their is either problem with your dataloader or the labels are wrong (check the json file of labels to verify the correctness of the labels).

I solved the problem: I had some bugs in my Data. The pictures had soft edges.
But now I have a different Problem. I just have one bounding boy for all animals of one class. How can I create a bounding box for every animal in one class?

What do you mean by soft edges? I checked internet, is it related to object being faded into the background.

I don’t get it. Your json file will contain image_name: bounding_boxes in that image+class of the box. If the annotations in the json file are correct, then you can do a simple for loop, to get the bounding boxes for each class.

The edges of the picture are not clear. So if the animal is selected in white and the background is black, then the edges are in different grey colors.

Yes, I get different boxes for different classes. But I only get one Box if there are more than one animal of one class. In my JSON file I got a lot a pictures with segmentation for every selected animal From the JSON file I created the pictures with the mask. On this pictures with the mask I want to create my boundin box. If I have two different animals, I get two correct bounding boxes. If I have two animal of the same kind, I get one big bounding Box insted of two.

It hint’s that the labelling process is incorrect.