mAP=0 error

I am using ssd-mobilnet_v2 to detect 1 kinds of objects , the maP precision and recall is always 0
here is my config file:
could someone help me please?
random_seed: 42
ssd_config {
aspect_ratios_global: “[1.0, 2.0, 0.5, 3.0, 1.0/3.0]”
scales: “[0.05, 0.1, 0.25, 0.4, 0.55, 0.7, 0.85]”
two_boxes_for_ar1: true
clip_boxes: false
variances: “[0.1, 0.1, 0.2, 0.2]”
arch: “mobilenet_v2”
freeze_bn: false
freeze_blocks: 0
}
training_config {
batch_size_per_gpu: 8
num_epochs: 80
enable_qat: false
learning_rate {
soft_start_annealing_schedule {
min_learning_rate: 5e-5
max_learning_rate: 2e-2
soft_start: 0.15
annealing: 0.8
}
}
regularizer {
type: L1
weight: 3e-5
}
}
eval_config {
validation_period_during_training: 5
average_precision_mode: SAMPLE
batch_size: 8
matching_iou_threshold: 0.5
}
nms_config {
confidence_threshold: 0.01
clustering_iou_threshold: 0.6
top_k: 200
}
augmentation_config {
output_width: 300
output_height: 300
output_channel: 3
}
dataset_config {
data_sources: {
label_directory_path: “/workspace/tlt-experiments/data/training/label_2”
image_directory_path: “/workspace/tlt-experiments/data/training/image_2”
}
include_difficult_in_training: true

target_class_mapping {
key: “head”
value: “head”
}
validation_data_sources: {
label_directory_path: “/workspace/tlt-experiments/data/val/label”
image_directory_path: “/workspace/tlt-experiments/data/val/image”
}
}
Output:

with another dataset:

To narrow down, can you train the public KITTI dataset too? The dataset is mentioned in the notebook.

my notebook is here,I used the kitti dataset
kitti.ipynb (133.1 KB)

Can you confirm you are training with a public KITTI dataset?
I can see below log during your training.

2021-03-12 10:04:13,047 [INFO] main: Number of images in the training dataset: 6733
2021-03-12 10:04:13,047 [INFO] main: Number of images in the validation dataset: 748

Is the training dataset your own dataset or something others?

Can you check if the label “head” is a class in your label files?

I’m really sorry, I uploaded the wrong file.
( Batch_size = 8 )mAP scores 5e-05, very bad.
I use a custom dataset of 300X300 images
my ouput s:
head_detection.ipynb (153.0 KB)
train file:
ssd_train_mobilenet_v2.txt (1.4 KB)

kitti dataset ouput:
kitti_ssdmobilenet.ipynb (201.5 KB)

what is wrong?

According to your kitti_ssdmobilenet.ipynb, even you trained a public KITTI dataset, the mAP is still very low.

Epoch 00020: saving model to /workspace/tlt-experiments/ssd/experiment_dir_unpruned_kitti_ssdmobilenet/weights/ssd_mobilenet_v2_epoch_020.tlt
Producing predictions: 100%|████████████████████| 47/47 [00:17<00:00, 2.66it/s]
Start to calculate AP for each class


car AP 0.00037
cyclist AP 0.0
pedestrian AP 0.0
mAP 0.00012


Validation loss: 1028.2166937353777

I will check if I can reproduce.

I can reproduce your error if I directly leverage the spec of resnet18.

For mobilenet_v2, please modify the max_learning_rate to a lower value. For example,

max_learning_rate: 2e-3

I run with this hyperparameter agianst KITTI dataset, the mAP 0 issue is gone.
Please try on your own dataset too.