Search code examples
pythonazurecntkazure-dsvm

CNTK on Data Science VM (FasterRCNN): ImportError: No module called 'utils.rpn'


I have just set up a new Data Science Virtual Machine on Azure. I wanted to run a script FasterRCNN.py from https://github.com/karolzak/CNTK-Hotel-pictures-classificator but received an error:

from utils.rpn.rpn_helpers import create_rpn, create_proposal_target_layer

ImportError: No module named 'utils.rpn'

The environment I am running the script on has Python 3.4 and CNTK 2.1 installed.

I tried to add a Detection or Detection/utils directories (by editing ~./bashrc) to PYTHONPATH:

export PYTHONPATH="$PYTHONPATH:/home/username/CNTK-Hotel-pictures-classificator/Detection"

as described in https://github.com/Microsoft/CNTK/issues/2705 but the error persists.

Update: Screenshot


Solution

  • If anyone is struggling: the solution to that problem is creating an empty __init__.py file in utils directory.