Skip to main content

Week 3 Complete automatic mode & Achieve the object recognition function

WEEK 3

Date: 14 February 2020
Place: EE Building, 3th floor/ Room 304, 2P22

Before lab

l  Finish installing mjpg-streamer which is for the remote monitoring module and finish constructing the webpage.
l  Learning the way to achieve remote controlling function based on bottle.
l  After completing automatic mode contemplated portion, we would use Tensorflow lite to achieve the object recognition function, which is based on Opencv. The program language we used was python3.

During lab

l  We tested the monitoring function based on mjpg-streamer and it worked well. We also improved quality of images and fluency, and our web design is simple and pretty.



l  Start working on automatic part. The first step is to build the recognition system. We would use Tensorflow lite to achieve this function. TF lite is an open source library for object recognition, which is based on Opencva library of programming functions that can shows real-time computer vision.

Problem and solution

The main problem we faced this week is installing Tensorflow issues. When we tried to run the program to open the web-camera, it showed:
ImportError: No module named cv2
We spent too much time working on solving this problem. We tried to reinstall all the files and ran it in other environment but it did not work. Moreover, we thought the reason was that we used wrong version of Python. Our python was updated to the newest version 3.8.1, but the system ran python2 by default. We tried to run the program on Python2 and it worked, and real-time version can be shown successfully. 

However, the problem is that Tensorflow do not support Python. In this case, we had to delate Python2 and used the newest version. Because of that, the other part of this project—the manual control part has to be reinstalled. After upgrading to the newest version, the Opencv is available but not the Tensorflow. We did a lot of search and tried serval different ways, then we found out that the problem is that the Tensorflow only updated to Python3.7 while python just updated to 3.8 early this year. It means there is no such kind of version of Tensorflow matching Python3.8. We downgraded the Python version back to 3.7.3 after serval attempts and our program worked finally.



Comments