Create a virtual environment
virtualenv --system-site-packages detection -p python3
Activate the environment
source detection/bin/activate
Install opencv
pip install opencv-contrib-python
pip install tensorflow
Create workspace
mkdir tf_ws
cd tf_ws/
mkdir src
catkin_make
source devel/setup.bash
cd src/
Create package
catkin_create_pkg obj_det rospy roscpp std_msgs geometry_msgs sensor_msgs cv_bridge image_transport
Go inside obj_det and create a scripts folder and inside scripts folder paste all the files in my repo
Make sure to source everytime you open a new terminal
Now open new terminal and type
roscore
In the previous terminal
python image_publisher_tf_detect.py
In another new terminal
python image_subscriber_tf.py
In one terminal
roscore
In another,
python basic_pub.py
Finally in a new terminal,
python deeplab_segment.py