New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Feature Request: Installation Guide for the Object Detection Model for Windows #1934

Closed
dennisushi opened this Issue Jul 12, 2017 · 10 comments

Comments

Projects
None yet
9 participants
@dennisushi

dennisushi commented Jul 12, 2017

System information

  • OS : Windows XP/ Vista/ 7/ 8 /10

Describe the problem

Issue : https://github.com/tensorflow/models/blob/master/object_detection/g3doc/installation.md

Installation guide for the object detection model is written for Ubuntu OS. Is it not supported by windows?

eg. the guide includes commands like "protoc object_detection/protos/*.proto --python_out=." that are not Windows commands.

I have gotten it to work with a virtual Ubuntu machine but believe it would be useful for the community if it was made simpler to use and install on Windows as well

PS. https://stackoverflow.com/questions/44789493/tensorflow-object-detection-api-on-windows This is a stack overflow similar issue with an answer that could be included in the Installation guide?

@dennisushi dennisushi changed the title from Feature Request: Installation Guide for the Object Detection Model for Windows to Update Feature Request: Installation Guide for the Object Detection Model for Windows Jul 12, 2017

@AndrewKemendo

This comment has been minimized.

Show comment
Hide comment
@AndrewKemendo

AndrewKemendo Jul 26, 2017

Agree with this. I am on Win 10 on a Surface Book and have gotten as far as manually building the pb2.py protocol buffers, but those seem to throw errors across the board, preventing any further work.

AndrewKemendo commented Jul 26, 2017

Agree with this. I am on Win 10 on a Surface Book and have gotten as far as manually building the pb2.py protocol buffers, but those seem to throw errors across the board, preventing any further work.

@dennisushi

This comment has been minimized.

Show comment
Hide comment
@dennisushi

dennisushi Jul 26, 2017

dennisushi commented Jul 26, 2017

@dennisushi

This comment has been minimized.

Show comment
Hide comment
@dennisushi

dennisushi Aug 3, 2017

@AndrewKemendo
Here are the steps I followed to install it for windows:
(Prerequisite, you must have python, pip and)

  1. Choose a Python release from here and download: Link here
  2. Extract the tar.gzor zip
  3. open a cmd and pip install the following: pillow, lxml, jupyter, matplotlib
  4. copy the protoc.exe from the protoc folder (you don't need to do all the CMake steps you might have stumbled upon, it worked for me without them too) and paste it into your protos folder in the object detection directory.
  5. Run the protoc for each of those protos like "protoc object_detection/protos/*.proto --python_out=.". . Note that you might encounter a problem with the paths and there's two ways around that: Either move the protoc.exe two folders down or do the noobish thing that I did - copy the protos and paste them into a new directory inside the protos folder 'object_detection\protos' so you would have a folder structure like'\object_detection\protos\object_detection\protos' (If it looks stupid but it works, it's not stupid eh?) Note that *.proto might also not work and you might have to do each of them individually

6 ) You are done. :) Try to run something to see if you have any problems. You might have to install a manual version of numpyandscipy

dennisushi commented Aug 3, 2017

@AndrewKemendo
Here are the steps I followed to install it for windows:
(Prerequisite, you must have python, pip and)

  1. Choose a Python release from here and download: Link here
  2. Extract the tar.gzor zip
  3. open a cmd and pip install the following: pillow, lxml, jupyter, matplotlib
  4. copy the protoc.exe from the protoc folder (you don't need to do all the CMake steps you might have stumbled upon, it worked for me without them too) and paste it into your protos folder in the object detection directory.
  5. Run the protoc for each of those protos like "protoc object_detection/protos/*.proto --python_out=.". . Note that you might encounter a problem with the paths and there's two ways around that: Either move the protoc.exe two folders down or do the noobish thing that I did - copy the protos and paste them into a new directory inside the protos folder 'object_detection\protos' so you would have a folder structure like'\object_detection\protos\object_detection\protos' (If it looks stupid but it works, it's not stupid eh?) Note that *.proto might also not work and you might have to do each of them individually

6 ) You are done. :) Try to run something to see if you have any problems. You might have to install a manual version of numpyandscipy

@apacha

This comment has been minimized.

Show comment
Hide comment
@apacha

apacha Nov 29, 2017

I've gotten quite far, by manually installing protobuffer for windows Version 2.6 (!) and building each file individually, since it did not understand the *-command on my side.

For my purpose I just wanted to use the ObjectDetectionEvaluation class, so I attempted the following:

cd tensorflow-models/research/slim
python setup.py install
cd ..
python setup.py install

Since this did not install the source properly (only copied the egg, but did not extract it, so the sources were not available), I just copying the entire object_detection and slim folders into my [Anaconda3]/Lib/site-packages directory.

apacha commented Nov 29, 2017

I've gotten quite far, by manually installing protobuffer for windows Version 2.6 (!) and building each file individually, since it did not understand the *-command on my side.

For my purpose I just wanted to use the ObjectDetectionEvaluation class, so I attempted the following:

cd tensorflow-models/research/slim
python setup.py install
cd ..
python setup.py install

Since this did not install the source properly (only copied the egg, but did not extract it, so the sources were not available), I just copying the entire object_detection and slim folders into my [Anaconda3]/Lib/site-packages directory.

@davemers0160

This comment has been minimized.

Show comment
Hide comment
@davemers0160

davemers0160 Dec 5, 2017

Windows has a problem with the *.proto and trying to pass in multiple files into protoc.exe

run_protoc.txt

Here's a quick script, just rename the extension to .bat and place it in /master-models/research and then run the file from the command line.

This assumes that you have the protoc.exe already in your path.

For the environment variable step you can type the following in the /master-models/research directory:
set PYTHONPATH=%PYTHONPATH%;%cd%;%cd%\slim

The %cd% is the equivalent of pwd in Windows. This also assumes that you already have PYTHONPATH defined.

davemers0160 commented Dec 5, 2017

Windows has a problem with the *.proto and trying to pass in multiple files into protoc.exe

run_protoc.txt

Here's a quick script, just rename the extension to .bat and place it in /master-models/research and then run the file from the command line.

This assumes that you have the protoc.exe already in your path.

For the environment variable step you can type the following in the /master-models/research directory:
set PYTHONPATH=%PYTHONPATH%;%cd%;%cd%\slim

The %cd% is the equivalent of pwd in Windows. This also assumes that you already have PYTHONPATH defined.

@tonmoyborah

This comment has been minimized.

Show comment
Hide comment
@tonmoyborah

tonmoyborah Feb 11, 2018

I have been trying everything I can and seriously, nothing work!!!

tonmoyborah commented Feb 11, 2018

I have been trying everything I can and seriously, nothing work!!!

@apacha

This comment has been minimized.

Show comment
Hide comment
@apacha

apacha Feb 11, 2018

@notsmartenough We had a very strange situation here as well. Have you tried installing/copying the respective folders to your environment?

apacha commented Feb 11, 2018

@notsmartenough We had a very strange situation here as well. Have you tried installing/copying the respective folders to your environment?

@tonmoyborah

This comment has been minimized.

Show comment
Hide comment
@tonmoyborah

tonmoyborah Feb 11, 2018

I finally had no errors when I uninstalled a lot of things and installed them again along with protoc 3.4. I was doing this for object detection using tensorflow API but now I face this issue when I try to run their tutorial template. Also python object_detection/builders/model_builder_test.py gives no mudule error.

tonmoyborah commented Feb 11, 2018

I finally had no errors when I uninstalled a lot of things and installed them again along with protoc 3.4. I was doing this for object detection using tensorflow API but now I face this issue when I try to run their tutorial template. Also python object_detection/builders/model_builder_test.py gives no mudule error.

@cy89

This comment has been minimized.

Show comment
Hide comment
@cy89

cy89 Feb 13, 2018

@notsmartenough shoulld we close in favor of #3359, or do you have a separate issue you'd like to debug here?

cy89 commented Feb 13, 2018

@notsmartenough shoulld we close in favor of #3359, or do you have a separate issue you'd like to debug here?

@luiscosio

This comment has been minimized.

Show comment
Hide comment
@luiscosio

luiscosio Apr 11, 2018

@davemers0160 hack works like a charm!

luiscosio commented Apr 11, 2018

@davemers0160 hack works like a charm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment