Hi everyone! I’ve been working on fine-tuning resnet50 a custom object detection model using the TensorFlow Object Detection API. The training process seems to technically work and the loss goes from around 1.89 down to 0.0004
However, the actual predicted bounding boxes are way off from where they should be, even though I can visualize my input images with the correct annotations. This suggests that the model is probably not being trained on the actual bounding box data properly.
While debugging, I realized I never created or used the train.record or eval.record files. I had assumed my manual label map and visualizations were enough. But now it seems the model isn’t getting the real annotated data it needs during training.(maybe not sure though )
The assignment instructions do mention generating .record files and I just didn’t fully grasp their importance earlier. My course license is about to expire soon, so I’m hoping to wrap this up quickly.
If anyone has an alternative way to ensure the model gets the correct bounding boxes without relying entirely on TFRecord, or if you know how to generate and integrate TFRecord files cleanly into an existing codebase, I’d really appreciate the guidance .
Thanks in advance to anyone who can help and your time means a lot!
Thanks for the response.
I am strictly following the code and instructions provided in assignment_ipynb file and course lectures respectively ( as I have intermediate knowledge). However, I did find some issues like the course lecture uses .compat.v2.checkpoint but the ipynb file uses .train.chechkpoint and a few more.
Also, how can I contact you to send the code file ?
My dataset is only 5 images of zombie images that were to be annotated and ground truth boxes around which I confirmed by plotting as well,(as instructed by the course lectures and code files as well ). Also, I did not have any instructions to check for imbalance in the test dataset as it was 236 images. Although ,I still remember checking the images and all of them were zombies as far as I remember.
If you mean I executed the code on my laptop this morning? Yes, I did. I cannot wait to finish it. Don’t know what mistake am I making. I thought you would have downloaded the file by now. I’m sorry if that caused any issues.
The images are from the assignment ipynb. There was a link from which I had to download images for train and test as well. I have done everything as the assignment file had instructed.
i didn’t needed to download the file as I saw you were running the same codes the assignment had. Now comes your prediction boxes being a bit off, you need to check if your labelling is correct
Plot the data before training to see if the bounding boxes are correct without using any if checks.
Also remember running code doesn’t mean just downloading images and using that as data intonthe same codes. you need to check you data images bounding boxes (xmin, xmax, ymin and ymax)
This would also require to check on you plotted this images like with masks, then one need to see if there is issue with dataloader or labelling process.
Remember even if you are using the same images the assignment provided, the bounding box part need to worked upon by you again to check why it is predicting well on the ground truth box.