balancap / SSD-Tensorflow

Single Shot MultiBox Detector in TensorFlow
4.11k stars 1.89k forks source link

Training a single class detection model #350

Open satyajithj opened 5 years ago

satyajithj commented 5 years ago

I am trying to train a single class detection model based on SSD-512 VGG. Command:

python3 train_ssd_network.py \
    --train_dir=./logs/ \
    --dataset_dir=./data/tfrecords \
    --dataset_name=pascalvoc_2007 \
    --dataset_split_name=train \
    --model_name=ssd_512_vgg \
    --num_classes=1 \
    --save_summaries_secs=60 \
    --save_interval_secs=600 \
    --weight_decay=0.0005 \
    --optimizer=adam \
    --learning_rate=0.001 \
    --batch_size=16

The loss is constant at 2.0167 for 500 steps. Changing the weight decay multiplies the loss by an order of magnitude. wd = 0.0005 implies loss = 20.167, wd = 0.00005 implies loss = 0.20167 etc. Is there a crucial step or information that I am missed?

thusinh1969 commented 5 years ago

Faces the same issue using this as backbone for Tensorflow Object Detection, using the same config file of ssd_mobilenet (changes size to 512 512 though). Anything I should have done differently as loss is almost constant !