0
$\begingroup$

I used Tensorflow object deteciton API following this tutorial and trained it to predict custom images of three category. After 49K steps and with most loss < 0.05 I stopped and froze the model. When i try to detect the object from image. The model correctly detects the object but provides wrong class label also it only gives one label for all detected object. I have checked the test.Record and train.Record which correctly captures the bounding box coordinates and class/class_text. I tried debugging the prediction model and found the below scores: This output is class and score for that particular class for each proposal. It returns 300 proposal value but i edited just for the question.

Classes: [[2. 1. 3. 3. 2. 2. 1. 3. 2. 1. 2. 2. 2. 2. 2. 2. 2. 2. 2. 1. 2. 2. 3. 2. 3. 2. 2. 2. 2. 3. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 1. 2. 2. 3. 2. 2. 2. 2. 2. 1. 2. 2. 1. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 3. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 3. 2. 2. 2. 1. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 3. 2. 2. 2. 1. 2. 2. 2. 2. 3. 3. 2. 2.]]

Scores [[9.34299827e-01 9.87844169e-02 7.54007278e-03 3.31299962e-04 8.95422545e-06 8.40702705e-06 7.37192840e-06 2.25948543e-06 1.55862494e-06 1.32166167e-06 9.75570629e-07 5.88678745e-07 5.05015009e-07 4.21588567e-07 2.58588926e-07 2.14299249e-07 1.97753181e-07 1.18188609e-07 7.23913232e-08 6.49422844e-08 6.09321731e-08 5.54216335e-08 4.88208514e-08 4.80325468e-08 4.59127847e-08 4.42321024e-08 4.26271001e-08 3.75534768e-08]]

The correct class label was 3 which has very low score comparing to other 2 class. For this checkpoint it favors class 2, I tried retraining and stopped early then found the model skewed to different class. but all of them consist of exponential scores. When I tried using the tutorial dataset and record file it contained 6 classes. With early stop I got different normalized output and more importantly it was able to predict more than one class though the accuracy was poor the scores were normal.

Classes: [[1. 6. 6. 6. 1. 1. 1. 5. 6. 1. 6. 6. 1. 6. 5. 5. 5. 5. 5. 6. 6. 3. 3. 3. 3. 1. 5. 4. 3. 1. 3. 5. 1. 2. 2. 5. 1. 3. 5. 3. 6. 6. 6. 5. 3. 4. 1. 4. 1. 2. 3. 5. 6. 4. 3. 4. 3. 4. 3. 3. 1. 5. 4. 2. 6. 4. 3. 4. 3. 2. 2. 2. 1. 6. 2. 3. 3. 6. 2. 6. 2. 1. 1. 4. 4. 2. 3. 2. 4. 4. 3. 4. 2. 4. 4. 4.]]

Scores [[0.8057396 0.54363483 0.41639847 0.4116147 0.40117604 0.30583626 0.28162587 0.19588488 0.17949946 0.17705482 0.14739332 0.1368773 0.11625872 0.09852906 0.09733354 0.09538303 0.09463519 0.07830063 0.07063951 0.06350185 0.06187743 0.05515279 0.05392814 0.05084944 0.04962941 0.04584368 0.04244312 0.04015012 0.03859867 0.03793424 0.03495875 0.03406471 0.03277094 0.03216837 0.03211389 0.0311062 0.03045315 0.03031772 0.02878817 0.02855495 0.02775684 0.02764305 0.02756038 0.0258495 0.02555148 0.02552066 0.02524703 0.0251481 0.02503884 0.024954 0.02364612 0.02353399 0.02353344 0.02315213 0.0230271 0.02294012 0.02266986 0.02261656 0.02215081 0.02189769]]

I want to know why after so many steps and with very less value my model is performing very poorly and why it stuck to single class. How can I solve this issue ?

I am using 600 images as trianing and 72 as validation. I used labelIMG to crop the images.

$\endgroup$

closed as unclear what you're asking by Tim Apr 18 '18 at 11:19

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ You really need to give us more details for this to be answerable, otherwise your question is "I ran some model and it doesn't work". $\endgroup$ – Tim Apr 18 '18 at 11:20
0
$\begingroup$

It might be caused by overfitting or by inbalanced data set. Look at documentation how to run evaluation job simultaneously to see how good is yout net performing. Tensorboard is a good tool to visualise what is going on.

Model gets often stuck to a single class, when your dataset is inbalanced, it means when your data contains too many examples of that class.

$\endgroup$
  • $\begingroup$ Yeah i figured out the issue with the data set. But in my case the variation among the data in single class caused this confusion. thanks for the information about eval. $\endgroup$ – Unbanned Apr 20 '18 at 11:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.