HaozhengLi / EAST_ICPR

Forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE
GNU General Public License v3.0
153 stars 60 forks source link

How can i test Resnet101 backbone based model? #1

Closed YefeiGao closed 4 years ago

YefeiGao commented 6 years ago

Thanks for ur work on this project, when i use resnet101 backbone based pre-trained model by replace the checkpoint path, it just didn't work, so what can i do to test resnet101 pre-trained model? Thx!

YefeiGao commented 6 years ago

i modified three parts of the code and it works, that inclued:

  1. model.py
    with slim.arg_scope(resnet_v1.resnet_arg_scope(weight_decay=weight_decay)):
    # logits, end_points = resnet_v1.resnet_v1_50(images, is_training=is_training, scope='resnet_v1_50')
    logits, end_points = resnet_v1.resnet_v1_101(images, is_training=is_training, scope='resnet_v1_101')
  2. resnet_v1.py
    if __name__ == '__main__':
    input = tf.placeholder(tf.float32, shape=(None, 224, 224, 3), name='input')
    with slim.arg_scope(resnet_arg_scope()) as sc:
        # logits = resnet_v1_50(input)
        logits = resnet_v1_101(input)
  3. resnet_v1.py
    try:
    # end_points['pool3'] = end_points['resnet_v1_50/block1']
    # end_points['pool4'] = end_points['resnet_v1_50/block2']
    end_points['pool3'] = end_points['resnet_v1_101/block1']
    end_points['pool4'] = end_points['resnet_v1_101/block2']
    except:
    end_points['pool3'] = end_points['Detection/resnet_v1_50/block1']
    end_points['pool4'] = end_points['Detection/resnet_v1_50/block2']

    hope this help others :)

HaozhengLi commented 6 years ago

Hello @YefeiGao

You are right.

And you managed to solve it before I saw your email, hahah. :)