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

Feature/enet image segmenter #784

Merged
merged 12 commits into from
Aug 29, 2017
Merged

Feature/enet image segmenter #784

merged 12 commits into from
Aug 29, 2017

Conversation

amc-nu
Copy link
Member

@amc-nu amc-nu commented Aug 23, 2017

Status

DEVELOPMENT

Description

This PR adds image segmentation capabilities to Autoware using ENet segmentation network.

Related Issue

Defined in autowarefoundation/autoware_ai#968

Todos

  • Tests
  • Documentation

Steps to Test or Reproduce

  1. Follow the README file in the ENet PAckage to install, compile the corresponding Caffe Fork and download pretrained models.
    https://github.com/CPFL/Autoware/blob/feature/enet_image_segmenter/ros/src/computing/perception/detection/packages/enet_image_segmenter/README.md

  2. Play a ROSBag containing image data, make sure it's being published in /image_raw or change the launch file accordingly or relay.

  3. Launch the node

roslaunch image_segmenter image_segmenter_enet.launch

The node will subscribe to /image_raw, it will publish /image_segmented and /image_segmented_blended as shown in:
https://drive.google.com/open?id=0BzYuVrO9pnh6MmNHVjJZSzZnUGc

Successfuly compiled on Ubuntu 14.04 and 16.04

-segmentation results in /image_segmented
-blended result with sensor /image_segmented_blended

Added README
@amc-nu amc-nu added the type:new-feature New functionalities or additions, feature requests. label Aug 23, 2017

2. Clone ENEt Caffe fork in your home directory
```
% git clone https://github.com/TimoSaemann/ENet.git

Choose a reason for hiding this comment

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

Since caffe-enet is contained in submodule, recursive option is necessary.

git clone --recursive https://github.com/TimoSaemann/ENet.git

Copy link
Member Author

Choose a reason for hiding this comment

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

@yk-fujii Done

% git clone https://github.com/TimoSaemann/ENet.git
```

3. Follow the authors' instruction to complete the requisites to compile.

Choose a reason for hiding this comment

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

Please add authors' instruction link

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@amc-nu
Copy link
Member Author

amc-nu commented Aug 28, 2017

Package renamed as suggested by @shinpei0208
@yk-fujii if you have no further comments, could you please approve and merge?
I would also like to push this package to Version2 branch

Copy link

@dejanpan dejanpan left a comment

Choose a reason for hiding this comment

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

I reviewed but didn't run because I do not have CUDA 8 in my docker yet.
Two Qs:

std_msgs
autoware_msgs
sensor_msgs
)

Choose a reason for hiding this comment

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

The problem with this in ROS is that you would also need to have these dependencies in package.xml file to correctly resolve dependencies when releasing this package. See: http://wiki.ros.org/catkin/package.xml:
"
Your system package dependencies are declared in package.xml. If they are missing or incorrect, you may be able to build from source and run tests on your own machine, but your package will not work correctly when released to the ROS community.
"

In other words, Autoware should really maintain 2 branches: jade and kinetic.

<build_depend>autoware_msgs</build_depend>
<run_depend>std_msgs</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>autoware_msgs</run_depend>

Choose a reason for hiding this comment

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

you are missing:

cv_bridge
image_transport
roscpp

image_transport
roscpp
std_msgs
autoware_msgs

Choose a reason for hiding this comment

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

you are never using:

std_msgs
autoware_msgs

So, remove?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm planning to use them in a future release. But, I agree, I'm not using them, I'll remove them.

#include <memory>
#include <string>
#include <utility>
#include <vector>

Choose a reason for hiding this comment

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

see google style guide for order of includes. cafffe and opencv should go after system libs.

#include <utility>
#include <vector>

using namespace caffe;

Choose a reason for hiding this comment

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

if (sample.size() != input_geometry_)
cv::resize(sample, sample_resized, input_geometry_);
else
sample_resized = sample;

Choose a reason for hiding this comment

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

use {} also around one line control structures

@amc-nu
Copy link
Member Author

amc-nu commented Aug 28, 2017

@dejanpan Done.

what is the best instruction to install CUDA 8?

I recommend using the official installer from NVIDIA https://developer.nvidia.com/cuda-downloads
Third party repos based setups tend to use older versions and/or mess with driver installations.

it is not clear to me which steps in here do I need to follow: https://github.com/TimoSaemann/ENet/tree/master/Tutorial?

Added further instructions to the README file.

Copy link

@yk-fujii yk-fujii left a comment

Choose a reason for hiding this comment

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

I think this is OK.

@amc-nu amc-nu merged commit 5c3adaf into develop Aug 29, 2017
@amc-nu amc-nu deleted the feature/enet_image_segmenter branch August 29, 2017 08:48
@mitsudome-r mitsudome-r added the version:autoware-ai Autoware.AI label Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:new-feature New functionalities or additions, feature requests. version:autoware-ai Autoware.AI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants