Skip to content

KeyError: 'DEEPLABV2-RESNET101-url' #6

@mjohn123

Description

@mjohn123

Hello all, I am using the code and got the error as following:
KeyError: 'DEEPLABV2-RESNET101-url'
This is my runing steps; First, I clone the code to my /home/john folder: /home/john/DeepLab-Context2. Then I build the code without error as follows:

[100%] Built target pycaffe

Secondly, I download DEEPLABV2-RESNET101 testing/training model and put them in the folder /home/john/DeepLab-Context2/voc12/model/vgg128_noup. Then I run the command

"ln -s vgg16.caffemodel init.caffemodel" at /home/john/DeepLab-Context2/voc12/model/vgg128_noup

I also changed the Pascal dataset link as

# MODIFY PATH for YOUR SETTING
EXP='voc' #dataset
NET_ID='vgg128_noup' #model name
NUM_LABELS=21
YEAR = 'VOC2012'
EXP= EXP + YEAR[-2:]
DATA_ROOT='/media/john/Study/databaseSeg/pascal/VOCdevkit/VOC2012'
#DATA_ROOT=subprocess.Popen('cd .. && pwd', stdout=subprocess.PIPE, shell=True).communicate()[0][:-1] + '/VOCdevkit/' + YEAR
OLD_ROOT=''#only change if you are changing the path to images
MODEL='DEEPLABV2-RESNET101'

Finally, I run the python code python run.py but I got the above error. How can I fix it? Thank all

DEEPLABV2-RESNET101
Traceback (most recent call last):
  File "run.py", line 71, in <module>
    run(RUN_TRAIN, RUN_TEST, RUN_TRAIN2, RUN_TEST2, RUN_SAVE)
  File "run.py", line 59, in run
    if RUN_TRAIN : trainer()
  File "/home/john/DeepLab-Context2/python/my_script/trainer.py", line 53, in trainer
    model = train_prototxt_maker(train, init, solver, train_set)
  File "/home/john/DeepLab-Context2/python/my_script/trainer.py", line 33, in train_prototxt_maker
    if not os.path.isfile(model): model=model_finder(os.environ['EXP']+ '/model/' + os.environ['NET_ID'])
  File "/home/john/DeepLab-Context2/python/my_script/tools.py", line 15, in model_finder
    url = os.environ[model_url]
  File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'DEEPLABV2-RESNET101-url'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions