Posts

some errors with tensorflow 'object_detection' and preprocessor_pb2

Problem solved Problem: ERROR: No module named 'object_detection' go to your tensorflow folder (..\Python\Python36\Lib\site-packages\tensorflow\) if there is not a folder call models or models-master download it from  https://github.com/tensorflow/models  and put the folder in tensorflow folder open cmd cd ..\Python\Python36\Lib\site-packages\tensorflow\models-master (or models) python setup.py install DONE Problem: ERROR: ImportError: cannot import name preprocessor_pb2 download  protoc-3.5.0-win32.zip   from https://github.com/google/protobuf/releases unzip and copy the protoc.exe in bin folder to your tensorflow\models\research folder (in my case is ..\Python\Python36\Lib\site-packages\tensorflow\models-master\research\) open cmd cd  ..\Python\Python36\Lib\site-packages\tensorflow\models\research\ (in my case is ..\Python\Python36\Lib\site-packages\tensorflow\models-master\research\) in normal case you can just run "protoc o...

How to instal labelimg 1.5.2 with python 3.6.3 and PyQt5 in Windows 10

Simple steps 1. download  labelImg-1.5.2.tar.gz  ( md5 ) )  from  https://pypi.python.org/pypi/labelImg#downloads 2. open cmd 3. pip install lxml 4. pip install pyqt5 5. cd dir\dir\labelImg-1.5.2 (to your labelImg-1.5.2 folder) 6. pyrcc5 -o resources.py resources.qrc 7. python labelImg.py Done! now you can run labelImg by clicking labelImg.py

Install python 3.6 with opencv 3.3.0 in windows 10

I want to using new method for mouse tracking. but it looks like not support python2.7. so I need to get a environment of python 3.6 and opencv 3.3.0 It is much much easier! because it already have pip and have a option to automatic add Path. install python 3.6 if you had install older version of python. please uninstall them before install new version. download python 3.6.3 from https://www.python.org/downloads/ run the "python-3.6.3.exe", remember to select "Add Python 3.6 to PATH" and install go to cmd, type "pip", make sure pip is installed. install opencv 3.3.0 download the correct .whl file from  https://pypi.python.org/pypi/opencv-python run cmd type "pip install packagename .whl" (packagename is the name of your .whl file) after it complete. goto IDLE and use following code the makesure it works. import cv2 print (cv2.__version__) cap = cv2.VideoCapture(0) #0 is 1st camera, 1 is 2nd while(True):     # Captu...

Insatll python 2.7.14 with opencv 3.3.0

WARNING: This is a quick note for myself. So this may not be the proper way for anything in this blog. I want to use python and opencv for mouse behavioral tracking for my experiments. Setup the environment of python2.7.14 and opencv3.3.0 update: I found that it is much easier to have python 3.6 with opencv 3.3.0. Please see the other python note for how to setup the environment. install python 2.7.x. this step is easy, just download from   https://www.python.org/downloads/  and install it.  install opencv 3.3.0 this step is annoying. download opencv 3.3.0 from  https://sourceforge.net/projects/opencvlibrary/files/opencv-win/ unzip the file and change the folder name to "opencv" copy and paste "opencv" file to C:\ go to "this PC" ->  right click, select "properties" -> "Advanced system settings" -> "Environmental Variables" -> chose "Path" in list of system variables -> click ...