Closed techaitr closed 5 years ago
I found my the problem. I chose of false weight graph. Thank you.
Can you please explain how you resolved this issue?
I selected the file path as the wrong weight file.
My steps are below.
Step 1:
python infer_detections.py --input_tfrecord_paths=C:/tensorflow1/models/research/object_detection/validation.record --output_tfrecord_path=C:/tensorflow1/models/research/object_detection/inference_graph/detections.tfrecord --inference_graph=C:/tensorflow1/models/research/object_detection/inference_graph/frozen_inference_graph.pb
step 2:
python confusion_matrix.py --detections_record=C:/tensorflow1/models/research/object_detection/inference_graph/detections.tfrecord --label_map=C:/tensorflow1/models/research/object_detection/training/labelmap.pbtxt
I can help if you explain the problem in more detail.
I just realized I was using the wrong label_map.pbtxt file the whole time. It is working fine now. Thanks anyway. By the way, the script provided has the dimensions of the confusion matrix as (N+1 x N+1) where N is the number of classes. Shouldn't the dimensions be (NxN) instead? Can you please explain the reason for the extra row and column in the confusion matrix
you can chech below link. it explained in detail.
https://www.shiftedup.com/2018/10/10/confusion-matrix-in-object-detection-api-with-tensorflow
Ok. thanks, I missed the point talking about the final row
Can anyone please explain how to calculate the number of True positves, False positives, False negatives and True negatives for each class
Hi, I used the below commands to print the confusion matrix Step 1: python inference/infer_detections.py --input_tfrecord_paths=C:/tensorflow1/models/research/object_detection/test.record --output_tfrecord_path=C:/tensorflow1/models/research/object_detection/inference_graph/detection_tfrecord --inference_graph=C:/tensorflow1/models/research/object_detection/inference_graph/frozen_inference_graph.pb
Step 2: python confusion_matrix.py --detections_record=C:/tensorflow1/models/research/object_detection/inference_graph/detection_tfrecord --label_map=C:/Tensorflow1/models/research/object_detection/training/labelmap.pbtxt --output_path=confusion_matrix.csv
I got the confusion matrix but the rows are columns are showing as zero. Precision and recall are showing as NAN. Could you please help me to solve the issue?
Merhaba Aysenur,
Öncelikle aynı sorunu yaşamışız fakat yukarıda bahsettiğim gibi sorun yanlış weight graph'dan kaynaklıydı. Benim çözümümde kullandığım path yukarıdaki gibi sende dikkatli bir şekilde bakarsan dosya yoluna sorununu çözebilir.
In English, Hi,
First of all, we experienced the same problem, but as I mentioned above, the problem was caused by the wrong weight graph. The path I use in my solution can solve your problem if you look carefully at the path as above.
Merhaba, Kullandığınız labelmap.pbtxt dosyası, aşağıdaki gibi sınıf id lerinin yazıldığı dosya değil mi?
item { id: 1 name: 'x' }
item { id: 2 name: 'y' }
item { id: 3 name: 'z' }
Merhaba,
Muhtemelen öyleydi ama sorununuz dosya yolunda doğru dosyaları kullandığınıza emin olun. Aşağıdaki gibi yazmışsınız. python inference/infer_detections.py --input_tfrecord_paths=C:/tensorflow1/models/research/object_detection/test.record --output_tfrecord_path=C:/tensorflow1/models/research/object_detection/inference_graph/_detectiontfrecord --inference_graph=C:/tensorflow1/models/research/object_detection/inference_graph/frozen_inference_graph.pb
"detection_tf.record" şeklinde olması gerekmez mi? belki de hatanız budur.
Merhaba, Sorun dosya yolunda değilmiş, dediğiniz gibi yapmama rağmen sorun düzelmedi. Test ve train dosyalarınızı .record formatında dosyalara dönüştürmeden önce test ve train dosyalarınız .csv formatında mıydı yoksa .json formatında mı?
Merhaba, xml > csv > .record sırasıyla bu şekildeydi.
mail adresini paylaşırsan döküman gönderebilirim.
Hi, I tested it with my new data set and this problem came up.
What do you think about this problem ?