none
CNTL Image Detection Example not working on Windows Data Science Virtual Machine (DSVM) ? RRS feed

Answers

All replies

  • Hi,

    Please install boost and dlib from conda:

    conda install -c menpo dlib boost

    Then pip install the other packages. Also note that the default Python environment on Windows is 2.7, and you will have to activate the 3.5 environment if that is where you want to install the packages:

    activate py35

    -Paul

    Wednesday, January 3, 2018 7:40 PM
    Owner
  • great, tx, willl give it a try! :)
    Wednesday, January 3, 2018 7:41 PM
  • Hi,

    tx again paul, was able to install the packages using your suggestion.

    however I do get another error now when running the "python run_fast_rcnn.py" command:

    --------------

    (C:\Anaconda\envs\py35) c:\dsvm\tools\cntk\Examples\Image\Detection\FastRCNN>python run_fast_rcnn.py
    Selected CPU as the process wide default device.
    Using base model:   AlexNet
    lr_per_sample:      [0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.0001]
    Training model for 20 epochs.
    Training 57216469 parameters in 21 parameter tensors.
    -------------------------------------------------------------------
    Build info:

                    Built time: Sep 15 2017 07:42:54
                    Last modified date: Thu Sep 14 22:33:54 2017
                    Build type: Release
                    Build target: GPU
                    With 1bit-SGD: no
                    With ASGD: yes
                    Math lib: mkl
                    CUDA version: 9.0.0
                    CUDNN version: 6.0.21
                    Build Branch: HEAD
                    Build SHA1: 23878e5d1f73180d6564b6f907b14fe5f53513bb
                    MPI distribution: Microsoft MPI
                    MPI version: 7.0.12437.6
    -------------------------------------------------------------------
    Traceback (most recent call last):
      File "run_fast_rcnn.py", line 32, in <module>
        trained_model = train_fast_rcnn(cfg)
      File "c:\dsvm\tools\cntk\Examples\Image\Detection\FastRCNN\FastRCNN_train.py", line 345, in train_fast_rcnn
        data = od_minibatch_source.next_minibatch(min(cfg.MB_SIZE, cfg["DATA"].NUM_TRAIN_IMAGES - sample_count), input_map=input_map)
      File "c:\dsvm\tools\cntk\Examples\Image\Detection\FastRCNN\..\utils\od_mb_source.py", line 70, in next_minibatch
        img_data, roi_data, img_dims, proposals, label_targets, bbox_targets, bbox_inside_weights = self.od_reader.get_next_input()
      File "c:\dsvm\tools\cntk\Examples\Image\Detection\FastRCNN\..\utils\od_reader.py", line 63, in get_next_input
        img_data, img_dims = self._load_resize_and_pad_image(index)
      File "c:\dsvm\tools\cntk\Examples\Image\Detection\FastRCNN\..\utils\od_reader.py", line 215, in _load_resize_and_pad_image
        self._prepare_annotations_proposals_and_stats(index, img)
      File "c:\dsvm\tools\cntk\Examples\Image\Detection\FastRCNN\..\utils\od_reader.py", line 181, in _prepare_annotations_proposals_and_stats
        proposals = self._proposal_provider.get_proposals(index, img)
      File "c:\dsvm\tools\cntk\Examples\Image\Detection\FastRCNN\..\utils\proposal_helpers.py", line 277, in get_proposals
        return compute_proposals(img, num_proposals, self._proposal_cfg)
      File "c:\dsvm\tools\cntk\Examples\Image\Detection\FastRCNN\..\utils\proposal_helpers.py", line 100, in compute_proposals
        if not ss_lib_loaded: load_selective_search_lib()
      File "c:\dsvm\tools\cntk\Examples\Image\Detection\FastRCNN\..\utils\proposal_helpers.py", line 22, in load_selective_search_lib
        from dlib import find_candidate_object_locations as algo
    ImportError: DLL load failed: The specified procedure could not be found.

    (C:\Anaconda\envs\py35) c:\dsvm\tools\cntk\Examples\Image\Detection\FastRCNN>

    ---------

    did find some similar posts, seem to be related to anaconda? (https://github.com/Microsoft/CNTK/issues/2423)
    again would greatly appreciate any help :)

    thanks again,



    • Edited by Rudgr Thursday, January 4, 2018 11:09 AM
    Thursday, January 4, 2018 9:57 AM
  • I hate to say it, but that works for me :)

    It sounds like dlib is complaining that it can't load a DLL. What happens if you start a new python session, then import dlib? 

    Thursday, January 4, 2018 8:05 PM
    Owner
  • haha, yeah #worksonmymachine ;-)

    greatly appreciate your help BTW, must be missing/doing somethnig stupid here.

    I tried importing dlib from a clean session:

    (C:\Anaconda\envs\py35) C:\Users\rbuijzen\Documents>python -c "import dlib"
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: DLL load failed: The specified procedure could not be found.

    tx again

    PS: It's a clean DataScience Virtual Machine, so would be happy to privately share a login with you if that would help?

    Sunday, January 7, 2018 12:41 PM
  • A login would be great. Email me at paulsh at microsoft dot com. 
    Monday, January 8, 2018 6:46 PM
    Owner
  • you've got mail. tx
    Monday, January 8, 2018 7:58 PM
  • We synced up offline and confirmed that one of the earlier attempts to install dlib is causing this issue. Creating a new Conda environment and installing there worked.
    Monday, January 8, 2018 8:52 PM
    Owner
  • It looks like CNTK may be writing a version of zlib.dll in the conda environment in c:\anaconda\envs\py35 directory that seems to break while trying to load the dlib.  As a workaround, I just moved the zlib.dll in that directory to something else (say zlib_.dll). 

    Thursday, January 25, 2018 7:30 PM