I'm trying to execute the colab notebook associated to the following link that trains Keras Retinanet in order to find objects inside images:
https://www.freecodecamp.org/news/object-detection-in-colab-with-fizyr-retinanet-efed36ac4af3/
However, even if I follow entirely the guide, when I start the train with the line :
!keras_retinanet/bin/train.py --freeze-backbone --random-transform --weights {PRETRAINED_MODEL} --batch-size 8 --steps 500 --epochs 10 csv annotations.csv classes.csv
I get this error at the first epoch:
WARNING:tensorflow:Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 5000 batches). You may need to use the repeat() function when building your dataset.
This even if, I repeat, I'm following exactly the notebook.
I also tried to train using the Pascal VOC as in the official github repo (by fizyr) is specified, but I get again this error.
Can someone help me? Thanks
EDIT: I managed to solve, by removing the default number of train steps in the train.py file, leaving keras to calculate itself the proper number steps automatically. I found the solution as posted by hansoli68 in the following thread: https://github.com/fizyr/keras-retinanet/issues/1449