how to obtain IOU during object detection training
Finding accuracy during training of object detection looks to be tricky and determining IOU can help in achieving this. I could not find any python code which does this in the object detection repo. Is there any way we can introduce this in object_detection/trainer.py? Thanks, Amit
Could you be more specific in terms of what precisely is the feature you'd like?
You can use tensorboard --logdir=/path/to/your_directory and then watch the loss variation.
If you also run eval.py in addition to train.py and their output directory is in the location of "your_directory", then you should also see this output in tensorboard.
@asimshankar it seems that eval.py is only outputting images with the bounding boxes as evaluated at the last checkpoint. I cannot run it in parallel with train.py due to some GPU config problem.
The question, therefore, is: can we get IOU measure for all the checkpoints that have been generated during training ?
"@asimshankar it seems that eval.py is only outputting images with the bounding boxes as evaluated at the last checkpoint. I cannot run it in parallel with train.py due to some GPU config problem."
@cipri-tom if the problem is memory usage, you can divide the allocate memory on the GPU for train and eval
in trainer.py & eval_util.py
add:
session_config.gpu_options.per_process_gpu_memory_fraction = 0.45
(for example )
Yes, "eval.py" is working fine. I can see how the accuracy is evolving there during "eval". But, sometimes, when the eval accuracy is lower, and the loss is not decreasing towards 0, it's good to be able to see what happened to the accuracy during the training process itself. It should saturate to almost 100%, since the network will try to memorize everything during training (and if trained for long enough). That will help in narrowing down the problem and indicate that the problem formulation itself is ok and the bug may be in some other part. This will help in debugging faster. For classification it's easy to get the accuracy metric during training, but in object detection the accuracy determination is not there in the code. It will be great to have the accuracy during training as well. Thanks, Amit
To just add to my point, suppose I have 3 objects to detect in an image. The loss which I will get at each step is a cumulative loss and it won't expose the loss for each of the 3 objects. So unless I have a way to expose the accuracy of individual objects we may not be able to know what is going on and how the network is handling each of them. For classification problem, once we know the labels and the logits, it's easy to find the accuracy during training and we can write to the summary, but how do we do this for object detection? Bottomline: If we can improve the code to obtain the training accuracy for individual objects it will be great and will give us a lot more information
how to get IOU Values for each detection (Not MAP)?
Object Detection project has completed this task.