ROC_AUC Curve and Precision Recall for NER - spacy

How can we plot the ROC-AUC curve or precision-recall curve using a spacy ner model or any token classification transformer model for each individual entity?

Related

How do I perform a confusion matrix calculation on my already custom trained YOLOv3 Tiny model?

I just finished training a yolov3 tiny model via google colab. I need the information regarding its accuracy in detection. How do I perform the evaluation for this model in terms of confusion matrix?

Can I generate heat map using method such as Grad-CAM in concatenated CNN?

I am trying to apply GradCAM to my pre-trained CNN model to generate heat maps of layers. My custom CNN design is shown as follows:
- It adopted all the convolution layers and the pre-trained weights from the VGG16 model.
- Extract lower level features (early convolution layers) from VGG16.
- Train the fully connected layers of both normal/high and lower level features from VGG16.
- Concatenate outputs of both normal/high- and lower-level f.c. layers and then train more f.c. layers before the final prediction.
model design
I want to use GradCAM to visualize the feature maps of the low-level route and the normal/high-level route and I have done such heatmaps on non-concatenate fine-tuned VGG using the last convolutional layers. My question is, on a concatenated CNN model, can the Grad-CAM method still work using the gradient of the prediction with respect to the low- and high-level feature map feature maps respectfully? If not, are there other methods that can do the heatmaps visualization for such a model? Is using the shared fully connected layer an option?
Any idea and suggestions are much appreciated!

What is the difference between an Estimator and a Regressor in TensorFlow tf.estimator?

TensorFlow Estimators (tf.estimator) are "high level tools for working with models". Instead of defining your own DNN classifier layer by layer there is already an estimator for that.
Everyone knows the difference between classifying features with a label and estimating a numeric value. However, what is the difference between a Regressor and an Estimator? For example DNNEstimator and DNNRegressor. The description says
DNNEstimator - An estimator for TensorFlow DNN models with user-specified head.
DNNRegressor - A regressor for TensorFlow DNN models.
A "head" in turn is an "interface for the head/top of a model". Would it be fair to say that DNNRegressor is a DNNEstimator with a RegressionHead or what is an Estimator?

Adversarially Robust Googlenet model

How train a googlenet model adversarially on an own image classification dataset?
For example: Using cleverhans library, the data that has batches to run the attacks on are MNIST and CIFAR.
I trained an image classifier with my own data (Googlenet) using Tensorflow, now I want to train the model with the adversarial examples. Any ideas that I can do with the cleverhans library. Thanks.
The easiest is probably to start from your own code to train GoogleNet and modify its loss. You can find an example modification of the loss that adds a penalty to train on adversarial examples in the CleverHans tutorial. It uses the loss implementation found here to define a weighted average between the cross-entropy on clean images and the cross-entropy on adversarial images.

Tensorflow Object-detection api

How can we draw ground truth boundary box with predicted boundary box at the time of inference by making use of tensorflow object detection api?
How to calculate precision,recall & mAP for object detection using SSD model with KITTI like dataset?
I suggest you see the mentioned following websites :
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md
https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html
if you use a pre-trained model which there are a large list of them in the TensorFlow model garden zoo, you can customize the model as well. another advantage of using TensorFlow models is that the precision of such models are measured previously and you don't need to measure them again as you see in the below picture:
but for the second part of your question, I can say that you can download the LabelImage GUI and use it to create bounding boxes on your train images and feed them to the TensorFlow object-detection-API
How can we draw a ground truth boundary box with a predicted bounding box at the time of inference by making use of TensorFlow object detection API?
Ans: you can draw a bounding box by XML file referred to the image by xml.etree.ElementTree function Extract XML coordinates if you want to draw a ground truth bounding box in the predicted image you can extract xmin,xmax,ymin and ymax in an XML file after that use cv2.rectangle to draw ground truth bounding box in the predicted image
How to calculate precision,recall & mAP for object detection using SSD model with KITTI like dataset?
Ans: in TF2 can use !python model_main_tf2.py --alsologtostderr --model_dir='___' --pipeline_config_path='____' --checkpoint_dir='____' or you can validated by yourself, for example, create the function to calculate IOU