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

Custom Detection Model Training: Validation values schow always 0.000000 #827

Closed
S13Drifter opened this issue Sep 22, 2023 · 1 comment
Closed

Comments

@S13Drifter
Copy link

S13Drifter commented Sep 22, 2023

Hello there,
I'm training a Custom Detection Model with two types of objects in the images to test out ImageAI.
This is the Code:
from imageai.Detection.Custom import DetectionModelTrainer
``
trainer = DetectionModelTrainer()
`trainer.setModelTypeAsYOLOv3()`
`trainer.setDataDirectory(data_directory="/content/drive/My Drive/MelipoAI/Dataset/melipo_ai")`
`trainer.setTrainConfig(object_names_array=["jatai"], batch_size=4, num_experiments=200,` `train_from_pretrained_model="yolov3.pt")`
`trainer.trainModel()`

It starts training the model but validation values are always at 0.000000

Generating anchor boxes for training images...
thr=0.25: 1.0000 best possible recall, 7.42 anchors past thr
n=9, img_size=416, metric_all=0.467/0.833-mean/best, past_thr=0.527-mean:
pretrained weight loading failed. Defaulting to using random weight.

Pretrained YOLOv3 model loaded to initialize weights

Epoch 1/200

Train:
25it [00:03, 7.41it/s]
box loss-> 0.10574, object loss-> 0.57634, class loss-> 0.00000
Validation:
16it [01:14, 4.64s/it]
recall: 0.000000 precision: 0.000000 mAP@0.5: 0.000000, mAP@0.5-0.95: 0.000000

Epoch 2/200

Train:
25it [00:03, 7.57it/s]
box loss-> 0.10004, object loss-> 0.18873, class loss-> 0.00000
Validation:
16it [01:17, 4.82s/it]
recall: 0.000000 precision: 0.000000 mAP@0.5: 0.000000, mAP@0.5-0.95: 0.000000`

...and so on.
What could be the reason? How can I fix this?
Thanks

@S13Drifter S13Drifter changed the title Validation values schow always 0.000000 Custom Detection Model Training: Validation values schow always 0.000000 Sep 22, 2023
@S13Drifter
Copy link
Author

Seems like the issue was that I only included one type of object. With more than one object it shows the validation values

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