tensorflow / models

Models and examples built with TensorFlow
Other
77.04k stars 45.77k forks source link

How to show Accuracy on tensorboard and training log using tensorflow object detection api #7456

Open good74152 opened 5 years ago

good74152 commented 5 years ago

System information

I am using faster_rcnn_inception_v2_pets.config with model_main.py , but i have no idea to show the classifier accuracy with test data

Have anyone know how to display the accuracy about test data on training log?

another question is how to display the accuracy about test data on tensorboard like this image

thanks

tensorflowbutler commented 5 years ago

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. Bazel version Exact command to reproduce

good74152 commented 5 years ago

@tensorflowbutler

  1. What is the top-level directory of the model you are using: (1) C:/tensorflow/models/research/object_detection/training/ (I put config、labelmap、training checkpoint here) (2) C:/tensorflow/models/research/object_detection/image/ (I put train、test image folder here) (3) C:/tensorflow/models/research/object_detection/ (I put test.record、train.record here) (4) C:/tensorflow/models/research/object_detection/faster_rcnn_inception_v2_coco_2018_01_28/ (I put pretrained model here)
  2. Have I written custom code (as opposed to using a stock example script provided in TensorFlow): NO
benouinirachid commented 4 years ago

Probably, this is the solution of your issue: https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html#monitor-training-job-progress-using-tensorboard

dilvishjohn commented 4 years ago

This is not a solution tensorboard from box has only loss graphics and no accuracy. I have same problem. If someone know how to track accuracy during learing help me please. @good74152 did you found solution?

syafiq32 commented 4 years ago

i have problem no accuracy show on tensorboard...any idea to fix it...

dilvishjohn commented 4 years ago

I have fixed accuracy on tensorflow for object detection api branch r1.13 and tensorflow 1.15.2 and tensorboard 1.16.0 maybe my way help you.

in config of model enable some metric I use this by defaul from this acticle https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html#evaluating-the-model-optional

eval_config: { metrics_set: "coco_detection_metrics" num_examples: 9 }

start train here command python model_main.py -alsologtostderr --model_dir=training\ --pipeline_config_path=training/1.config

it will be generate need eval folder with evaluation data inside training folder run this command from this folder model\research\object detection\ tensorboard --logdir=training --host localhost

Profit!!!

@syafiq32 hope my solution works for you

syafiq32 commented 4 years ago

thank you @dilvishjohn

syafiq32 commented 4 years ago

i done following your step @dilvishjohn ...... why graph not show like below ..... Capture

dilvishjohn commented 4 years ago

@syafiq32 cause it's different metrics... here supported metrics of object detection. I think you need found metrics from this graphs or create them by you own, but it's hard and i don't know how it can be done. I sutisfied by coco metrics for me https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/evaluation_protocols.md

syafiq32 commented 4 years ago

it so okey.... thank you @dilvishjohn for your time read my problem and give suggention to me.... i will try later....

kevinkwabena commented 4 years ago

i done following your step @dilvishjohn ...... why graph not show like below ..... Capture

is this in object detection

anacondabitch commented 4 years ago

or you can review the line 58 in evaluator.py located in models-1.13.0.zip\models-1.13.0\research\object_detection\legacy fodler .. note this only works if you're using train.py and eval.py for training

dilvishjohn commented 4 years ago

For my problem we decided to not use CNN I create solution based on opencv cannyedgedetecor and template matching + multiscale resizing to detect object using image template on different resolutions. I didn't do any good goal in CNN but i am to machine learning and probably did some mistakes, but i am not sure that is possible to train CNN on 1 image to detect same object on different resolutions

JackDanHollister commented 4 years ago

I would still be interested in a solution to this if anyone can help with this.

Ive spent the lat couple of days searching for iformation on this subjec and this thread is the closest anyone has come to discussing this!

IamExperimenting commented 3 years ago

Hey @dilvishjohn, thanks for your recommendation. Could you please provide the folder structure? because I didn't understand this bit "it will be generate need eval folder with evaluation data inside training folder" which you have mentioned in your previous comment.

llingtingzhe commented 3 years ago

does anyone know how to display the accuracy on tensorbord?

Annieliaquat commented 2 years ago

plz need answer for this question. does anyone know how to display the accuracy on tensorbord?

raulperezalejo commented 2 years ago

Standing here too looking for this answer. There may be a way to see the "history" the same way i do when "fitting" my model manually. Not sure if there is any other way to graph Validation and Training Accuracy, this is useful for me because i can check Overfitting