microsoft / VoTT

Visual Object Tagging Tool: An electron app for building end to end Object Detection Models from Images and Videos.
MIT License
4.32k stars 838 forks source link

Unable to review model with faster-rcnn #159

Closed ChunHsinWang closed 6 years ago

ChunHsinWang commented 6 years ago

I would like to validate new test images with faster rcnn model. After loading in the model with VoTT window, the output folder only contains images without any prediction, and a spinning circle on the VoTT window. I have checked the cpu and gpu utilization and I don't think it has ran though the model.

ChunHsinWang commented 6 years ago

The model was trained with the script in CNTK/Examples/Detection

aribornstein commented 6 years ago

This feature does work but it takes a little bit of configuration. First you need to have cntk installed in c:\local\cntk with all the object detection dependencies. Also make sure you running VoTT from npm and not one of the release executable.

I recommend pulling the latest code and running the following commands.

npm install npm start

If this does not fix the problem, though it should. please open the debug console and copy and paste the error you are getting here.

ChunHsinWang commented 6 years ago

I tried to start VoTT with the latest pull from npm commands as you suggested, I could not load in images and videos with the following errors:

Uncaught Error: Cannot find module 'cntk-fastrcnn' at Module._resolveFilename (module.js:470:15) at Function.Module._resolveFilename (D:\VoTT\node_modules\electron\dist\resources\electron.asar\common\reset-search-paths.js:35:12) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object. (D:\VoTT\src\lib\detection_algorithms\cntkfastrcnn\reviewer.js:5:18) at Object. (D:\VoTT\src\lib\detection_algorithms\cntkfastrcnn\reviewer.js:74:3) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) index.js:314 Uncaught ReferenceError: DetectionExtension is not defined at HTMLDivElement.loadTagger (index.js:314)

I have cntk installed in c:/local/cntk, any suggestion on why it could not find the faster rcnn module?

ChunHsinWang commented 6 years ago

I have tried npm install in the VoTT\src\lib\detection_algorithms\cntkfastrcnn, and no long have this error, the images can now being loaded too. However, when I tried to load in the model for review, this error showed:

D:\VoTT\src\lib\detection_algorithms\cntkfastrcnn\node_modules\cntk-fastrcnn\src\python_eval_client…:96 verbose D:\VoTT\src\lib\detection_algorithms\cntkfastrcnn\node_modules\cntk-fastrcnn\src\python_eval_client…:98 CNTK process output: D:\VoTT\src\lib\detection_algorithms\cntkfastrcnn\node_modules\cntk-fastrcnn\src\python_eval_client…:99 D:\VoTT\src\lib\detection_algorithms\cntkfastrcnn\reviewer.js:62 Error: CNTK Process failed with error code 1 Error output:Traceback (most recent call last): File "D:\VoTT\src\lib\detection_algorithms\cntkfastrcnn\node_modules\cntk-fastrcnn\src\frcnn_detector.py", line 363, in cntk_scripts_path=cntk_scripts_path) File "D:\VoTT\src\lib\detection_algorithms\cntkfastrcnn\node_modules\cntk-fastrcnn\src\frcnn_detector.py", line 75, in init from cntk_helpers import imArrayWidthHeight, getSelectiveSearchRois, imresizeMaxDim ImportError: No module named 'cntk_helpers'

at ChildProcess.proc.on (D:\VoTT\src\lib\detection_algorithms\cntkfastrcnn\node_modules\cntk-fastrcnn\src\python_eval_client…:82)
at emitTwo (events.js:106)
at ChildProcess.emit (events.js:194)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215)

D:\VoTT\src\lib\detection_algorithms\cntkfastrcnn\reviewer.js:65 undefined internal/process/next_tick.js:109 Uncaught (in promise) undefined

aribornstein commented 6 years ago

The issue seems to be your installation of cntk. Is cntk installed in the default c:/local/cntk directory?

My recommendation is to go through the following instructions and make sure cntk is installed correctly. https://docs.microsoft.com/en-us/cognitive-toolkit/object-detection-using-faster-r-cnn#setup

We are working on making the installation story more seamless.