balancap / SSD-Tensorflow

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

failed when fine-tuned from ResNet checkpoint #117

Open zgxiangyang opened 7 years ago

zgxiangyang commented 7 years ago

I just used the fine-tune example, but changed to resnet. These are my commands.

  1 DATASET_DIR=../data/Logos/VOC-Logos/tfrecords/
  2
  3 TRAIN_DIR=./log/
  4 CHECKPOINT_PATH=../SSD-Tensorflow/checkpoints/inception_resnet_v2_2016_08_30/inception_resnet_v2_    2016_08_30.ckpt
  5
  6 python3 ../SSD-Tensorflow/train_ssd_network.py \
  7     --train_dir=${TRAIN_DIR} \
  8     --dataset_dir=${DATASET_DIR} \
  9     --dataset_name=VOC-Logos \
 10     --dataset_split_name=train \
 11     --model_name=ssd_300_vgg \
 12     --checkpoint_path=${CHECKPOINT_PATH} \
 13     --checkpoint_model_scope=inception_resnet_v2 \
 14     --num_classes=22 \
 15     --checkpoint_exclude_scopes=ssd_300_vgg/conv6,ssd_300_vgg/conv7,ssd_300_vgg/block8,ssd_300_vg    g/block9,ssd_300_vgg/block10,ssd_300_vgg/block11,ssd_300_vgg/block4_box,ssd_300_vgg/block7_box,ss    d_300_vgg/block8_box,ssd_300_vgg/block9_box,ssd_300_vgg/block10_box,ssd_300_vgg/block11_box \
 16     --trainable_scopes=ssd_300_vgg/conv6,ssd_300_vgg/conv7,ssd_300_vgg/block8,ssd_300_vgg/block9,    ssd_300_vgg/block10,ssd_300_vgg/block11,ssd_300_vgg/block4_box,ssd_300_vgg/block7_box,ssd_300_vgg    /block8_box,ssd_300_vgg/block9_box,ssd_300_vgg/block10_box,ssd_300_vgg/block11_box \
 17     --save_summaries_secs=60 \
 18     --save_interval_secs=600 \
 19     --weight_decay=0.0005 \
 20     --optimizer=adam \
 21     --learning_rate=0.001 \
 22     --learning_rate_decay_factor=0.92 \
 23     --batch_size=32

And this is my error information.

NotFoundError (see above for traceback): Tensor name "inception_resnet_v2/conv1/conv1_1/biases" not found in checkpoint files ../SSD-Tensorflow/checkpoints/inception_resnet_v2_2016_08_30/inception_resnet_v2_2016_08_30.ckpt
         [[Node: save_1/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save_1/Const_0_0, save_1/RestoreV2/tensor_names, save_1/RestoreV2/shape_and_slices)]]
RoseLii commented 7 years ago

please help me ? when i run

This is the eval script.

DATASET_DIR=/home/doctorimage/kindlehe/common/dataset/VOC2007/VOCtest_06-Nov-2007/VOCdevkit/VOC2007_tfrecord/

/home/doctorimage/kindlehe/common/dataset/VOCdevkit/

../../../../common/dataset/VOC2007/VOCtest_06-Nov-2007/VOCdevkit/

EVAL_DIR=../log_files/log_eval/ # Directory where the results are saved to CHECKPOINT_PATH=/home/doctorimage/kindlehe/common/models/tfmodlels/SSD/VGG_VOC0712_SSD_300x300_ft_iter_120000/VGG_VOC0712_SSD_300x300_ft_iter_120000.ckpt

../../../../common/models/tfmodlels/SSD/VGG_VOC0712_SSD_300x300_ft_iter_120000/VGG_VOC0712_SSD_300x300_ft_iter_120000.ckpt

dataset_name这个参数在代码里面写死了

python3 ../eval_ssd_network.py \ --eval_dir=${EVAL_DIR} \ --dataset_dir=${DATASET_DIR} \ --dataset_name=pascalvoc_2007 \ --dataset_split_name=test \ --model_name=ssd_300_vgg \ --checkpoint_path=${CHECKPOINT_PATH} \ --batch_size=1

raise ValueError('No data files found in %s' % (data_sources,)) ValueError: No data files found in /home/y/2T/wangxingli/SSD-Tensorflow/shujuji/VOCtrainval_06-Nov-2007/VOCdevkit/VOC2007/voc_2007test*.tfrecord but i DATASET_DIR is my datasets path,why error

guiyang882 commented 7 years ago

@zgxiangyang where is inception_resnet_v2_2016_08_30. You train the model by yourself ?

ManiroXi commented 7 years ago

@RoseLii I got the same error with you, have you figure out it?

tgbamg commented 6 years ago

@RoseLii @ManiroXi I got the same error, have you fix it?