Skip to content
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

Create tensorflowDetection2D app #93

Merged
merged 60 commits into from
Sep 23, 2019
Merged

Create tensorflowDetection2D app #93

merged 60 commits into from
Sep 23, 2019

Conversation

davidvelascogarcia
Copy link

@davidvelascogarcia davidvelascogarcia commented Feb 12, 2019

Tensorflow: Detector 2D C++ API

Addresses #92.

Description

The pull request adds tensorflowDetection2D module. tensorflowDetection2D module use tensorflow C++ API. The module detects using pre-trained models like VGG16, Inception, ResNet, MobileNet and other pre-trained models. The module build with cmake instead of bazel using tensorflow_cc. Also use YARP to send video source pre and post-procesed. Also admits YARP source video like input. The module has been tested with handstracking model and ssd_mobilenet_v1_coco. This module also publish detection results in YARP port.

C.I

Continuous integration with Travis is in process here. Right now, i´ve problems with Travis timeout. C.I works using Docker image with tensorflow_cc pre-build.

Installation guides

Installation guides done at roboticslab-uc3m/installation-guides#64.

programs/tensorflowDetection2D/TensorflowDetector.hpp Outdated Show resolved Hide resolved
programs/tensorflowDetection2D/TensorflowDetector.hpp Outdated Show resolved Hide resolved
programs/tensorflowDetection2D/TensorflowSessionTest.cpp Outdated Show resolved Hide resolved
programs/tensorflowDetection2D/CMakeLists.txt Outdated Show resolved Hide resolved
programs/tensorflowDetection2D/main.cpp Outdated Show resolved Hide resolved
programs/tensorflowDetection2D/CMakeLists.txt Show resolved Hide resolved
programs/tensorflowDetection2D/main.cpp Outdated Show resolved Hide resolved
programs/tensorflowDetection2D/MainDetector.cpp Outdated Show resolved Hide resolved
@PeterBowman
Copy link
Member

Please add add_subdirectory(tensorflowDetection2D) below this line.

@davidvelascogarcia
Copy link
Author

davidvelascogarcia commented Feb 19, 2019

Travis CI: Error

@davidvelascogarcia
Copy link
Author

@PeterBowman New entry added at f01931b.

@davidvelascogarcia
Copy link
Author

The last frozen_graph.pb file that i tested was to heavy to be uploaded to github without LFS.
The model was ssd_mobilenet_v1_coco_2018_01_28.
Attached pre-trained models list.

@@ -9,6 +9,7 @@
- [Install YARP 2.3.70+ and OpenNI2DeviceServer](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-yarp.md)
- [Install OpenCV](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-opencv.md)
- [Install color-debug](https://github.com/roboticslab-uc3m/color-debug)
- [Install tensorflow_cc 1.12+](https://github.com/FloopCZ/tensorflow_cc)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done at 74eb52c.

@jgvictores
Copy link
Member

Review to remove OpenCV dependency as well as adquisition/viewer, just in/out ports like

BufferedPort<ImageOf<PixelRgb> > inImg;
BufferedPort<ImageOf<PixelRgb> > outImg;

@davidvelascogarcia
Copy link
Author

@PeterBowman Thanks. I´m using docker in tensorflow-cpp-examples repo. Right now, I can load docker image with ubuntu and tensorflow_cc. I´m trying to install yarp on it.

@davidvelascogarcia
Copy link
Author

@PeterBowman @jgvictores Travis CI working with tensorflow_cc docker image, yarp and opencv in tensorflow-cpp-examples repo test.
Right now, build takes 15 minutes but without using cache because i don´t know how to make a cache of docker image data.

@PeterBowman
Copy link
Member

If I'm correct, a new Docker image can be started so that everything (tensorflow_cc + YARP + OpenCV etc.) will be preinstalled, we'd just need to git pull the vision repository. @jgvictores I'd create a roboticslab organization at Docker Hub in which our own images can be hosted. Let's speak 💀2💀?

@PeterBowman
Copy link
Member

I'd create a roboticslab organization at Docker Hub in which our own images can be hosted. Let's speak skull2skull?

Outcome:

@davidvelascogarcia
Copy link
Author

SegmentorThread added at f3881d8, fix format and similar to haarDetection2D.

@davidvelascogarcia
Copy link
Author

tensorflowDetection2D trained model and label map model drive link added at 55256a4.
I have added .md at /share/tensorflowDetection2D/conf path instead of .pb and .pbtxt with small installation guide because i didn´t know where to put the explanation about how to set the models.

@davidvelascogarcia
Copy link
Author

Readme moved to path program at 54891dd

@davidvelascogarcia davidvelascogarcia changed the title [WIP] Create tensorflowDetection2D app Create tensorflowDetection2D app Jul 16, 2019
@davidvelascogarcia
Copy link
Author

Waiting for revision.

@jgvictores
Copy link
Member

  1. I'm seeing that the README lacks some info, such as the algorithm itself (looks like a YOLO or similar). Some info from this PR description could be used/ported.
  2. labels_map.pbtxt is in the PR but also in the Google Drive link. I'd remove it from the PR but we should also be careful and remove it from CMakeLists.txt.

@davidvelascogarcia
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants