Giter VIP home page Giter VIP logo

semantic-segmentation-editor's Introduction

Semantic Segmentation Editor

A web based labeling tool for creating AI training data sets (2D and 3D). The tool has been developed in the context of autonomous driving research. It supports images (.jpg or .png) and point clouds (.pcd). It is a Meteor app developed with React, Paper.js and three.js.

Latest changes

  • Version 1.5: Provide a Docker image and update to Meteor 1.10
  • Version 1.4: Support for RGB pointclouds (thanks @Gekk0r)
  • Version 1.3: Improve pointcloud labeling: bug fixes and performance improvement (labeling a 1M pointcloud is now possible)
  • Version 1.2.2: Breaking change: exported point cloud coordinates are no longer translated (thanks @hetzge)
  • Version 1.2.0: Support for binary and binary compressed point clouds (thanks @CecilHarvey)

Bitmap Image Editor

🎥 VIDEO: Bitmap labeling overview

🚀 DEMO: Bitmap editor

PCD Point Cloud Editor

🎥 VIDEO: Point cloud labeling overview

🚀 DEMO: Point cloud editor

How to run

Using Docker Compose

  1. Download the docker compose stack file (sse-docker-stack.yml)
  2. Set the folder that contains bitmap and point cloud files (YOUR_IMAGES_PATH) and run the tool using docker-compose
  3. The tool runs by default on port 80, you can change the mapping in sse-docker-stack.yml
wget https://raw.githubusercontent.com/Hitachi-Automotive-And-Industry-Lab/semantic-segmentation-editor/master/sse-docker-stack.yml
wget https://raw.githubusercontent.com/Hitachi-Automotive-And-Industry-Lab/semantic-segmentation-editor/master/settings.json
METEOR_SETTINGS=$(cat ./settings.json) SSE_IMAGES=YOUR_IMAGES_PATH docker-compose -f stack.yml up

(Optional) You can modify settings.json to customize classes data.

Running from source

Install Meteor (OSX or Linux)

curl https://install.meteor.com/ | sh

or download Meteor Windows Installer

Download and unzip latest version from here

Start the application

cd semantic-segmentation-editor-x.x.x
meteor npm install
meteor npm start

The editor will run by default on http://localhost:3000

(Optional) Edit settings.json

By default, images are served from your_home_dir/sse-images and pointcloud binary segmentation data are stored in your_home_dir/sse-internal. You can configure these folders in settings.json by modifying images-folder and internal-folder properties. On Windows, use '/' separators, example c:/Users/john/images

Check Meteor Environment Variables to configure your app (MONGO_URL, DISABLE_WEBSOCKETS, etc...)

Configuration File: settings.json

{
  "configuration": {
    "images-folder": "/mnt/images", // The root folder containing images and PCD files
    "internal-folder": "/mnt/pointcloud_data" // Segmentation data (only 3D) will be stored in this folder
  },
  // The different sets of classes available in the tool
  // For object classes, only the 'label' field is mandatory
  // The icon field can be set with an icon from the mdi-material-ui package
  "sets-of-classes": [
    {
      "name": "Cityscapes", "objects": [
      {"label": "VOID", "color": "#CFCFCF"},
      {"label": "Road", "color": "#804080", "icon": "Road"},
      {"label": "Sidewalk", "color": "#F423E8", "icon": "NaturePeople"},
      {"label": "Parking", "color": "#FAAAA0", "icon": "Parking"},
      {"label": "Rail Track", "color": "#E6968C", "icon": "Train"},
      {"label": "Person", "color": "#DC143C", "icon": "Walk"},
      {"label": "Rider", "color": "#FF0000", "icon": "Motorbike"},
      {"label": "Car", "color": "#0000E8", "icon": "Car"}
    },
    { ... }
  ]
}

How to use

The editor is built around 3 different screens:

The file navigator let's you browse available files to select a bitmap images or a point cloud for labeling

The bitmap image editor is dedicated to the labeling of jpg and png files by drawing polygons

The point cloud editor is dedicated to the labeling of point clouds by creating objects made of subsets of 3D points

Using the bitmap image editor

There are several tools to create labeling polygons:

Polygon Drawing Tool (P)

  • Click and/or drag to create points
  • Type ESC to remove last created points in reverse order
  • Drag the mouse pointer or hold Shift to create a complex polygon without having to click for each point
  • Type ENTER or double click the first point to close the polygon

Magic Tool (A)

  • Create a polygon automatically using contrast threshold detection
  • This tool is only useful to draw the outline of objects that have sharp contrasted edges (examples: sky, lane marking)
  • Click inside the area you want to outline, then adjusts any sliders on the right to adjust the result
  • Type ENTER to validate the result

Manipulation Tool (Alt)

  • Select, move and add point(s) to existing polygons
  • Click inside a polygon to select it
  • Click a point to select it
  • Draw a lasso around multiple points to select them
  • Drag a point with the mouse to move it
  • Hold Shift to separate points that belongs to more than one polygon
  • Click the line of a polygon to create a new point and drag the newly created point to place it

Cutting/Expanding Tool (C)

  • Modify the shape of an existing polygon
  • Select the polygon you want to modify
  • Draw a line starting and ending on the outline of a polygon
  • The new line replace the existing path between starting and ending points
  • The resulting shape is always the largest one

Contiguous Polygon Tool (F)

  • Create contiguous polygons easily

  • Start a new polygon with the Polygon Drawing Tool

  • Create the starting point by snapping to the outline of the polygon you want to workaround
  • Create the ending point by snapping to another outline, at this point you must have a straight line crossing one or more existing polygons
  • Hit F one or several times to choose what workaround path to use

Using the point cloud editor

  • Mouse left button: Rotate the point cloud around the current focused point (the center of the point cloud by default), click on a single point to add it to the current selection
  • Mouse wheel: Zoom in/out
  • Mouse middle button (or Ctrl+Click): Change the target of the camera
  • Mouse right button: Used to select multiple points at the same time depending on the current Selection Tool and Selection Mode.
  • Arrow keys: Move through the scene

PCD support

  • Supported input PCD format: ASCII, Binary and Binary compressed
  • Supported input fields: x, y, z, label (optional integer), rgb (optional integer)
  • Output PCD format is ASCII with fields x, y, z, label, object and rgb (if available)

API Endpoints

  • /api/listing: List all annotated images
  • /api/json/[PATH_TO_FILE]: (2D only) Get the polygons and other data for that file
  • /api/pcdtext/[PATH_TO_FILE]: (3D only) Get the labeling of a pcd file using 2 addditional columns: label and object
  • /api/pcdfile/[PATH_TO_FILE]: (3D only) The same but returned as "plain/text" attachment file download

semantic-segmentation-editor's People

Contributors

andreatomatis avatar brucechou1983 avatar dariosiroki avatar dependabot[bot] avatar dmandrioli avatar gekk0r avatar weimzh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

semantic-segmentation-editor's Issues

Corrupted download image

hello,
in the beginning, I really want to thank you for this great tool. it saved me a lot of time and effort

i got a problem when i press the download button after I segmented an image.

it is shown in this screenshot

image

image

Unable to remove the annotation in Point Cloud tool.

Hi Team,
This is really an amazing tool. Good job.
I am facing one issue. If I select the points for a class (say Car) these are selected in red color. I can remove a particular point which does not belongs to this Car class by using (-) button provided in the tool. All works perfect till here.
Now, when I finally add these points to the car class, these points color changes to blue. Now, If I want to remove any point (which was marked mistakenly) from this class, I cannot do that.
Could you please help with this?

Unable to run the tool for pointcloud

I have successfully installed Meteor using Chocolatey but I am unable to run the tool. Could you please suggest how to proceed further using this tool?
I am using Windows OS.

Export segmentations as separate image

I might have missed it, but is there a way to export just the segmentations as images? Downloading the image saves the image with both the original and overlaid segmentations. I'm aware of the JSON format, but is there an easy tool for translating that into a segmentation image?

How can i define my own class name in the docker enviroment

hi Damien Mandrioli:
i want to use this tools to building my own pcl dataset , on VM(ubuntu16.04),and windows 10 install ,all fail,but the docker can run . i wanna change the calss name in label pcl ,how can do that!

thanks for your help!

Add Next/Previous buttons to navigate through the files directly from editors

hi, guys.
very good work for semantic segmentation labelling.

Is there a fast way to load next example when finish labelling the current one?
Currently, I have to go back to the file browser, then click some image to load next one, which reduce the label speed.

A fast hotkey is needed for save current example and load next one.

json to png annotation

Is there a function that support json that descript polygon to png annotation image used for segmentation training?

Black screen on MacOs

Hello, i have a black screen when running the app even if the input folder contains .jpg images.
Permissions on the input folder are set to drwxrwxrwx

No error in logs.

macOs 10.13.6
[email protected]

Not responding to mouse events

Hi, thanks for creating this tool!

I'm running sse in my own browser, and trying to draw a polygon on my image. However, after selecting the polygon tool and clicking on the image, nothing happens. It's the same with rectangle tool and magic tool.

I do not get any error statement in browser or terminal. I tried inserting a console.log statement in SsePolygonTool.onMouseDown, and it seems that the function is not triggered when I click on the image.

It would be really great if you can help diagnose the issue.

Undo/Redo option for Point Cloud tool

Hi Team,
It will be great if you add and Undo/Redo option for PointCloud editing tool. Whenever I mistakenly select a large number of point (using right click), I have to manually undo them all. An Undo option will be great to clear my last action performed.
And similarly for Redo.

support to generate masks?

Is there any way that we could get some support for masks - i.e. binary or multiple class segmentation so each pixel is labelled at the category level (e.g. background 0, car 1, bicycle 2 etc).

Editor windows do not open

When I try to run the app with "meteor npm start" I get the following:

`Number of available sets of object classes: 3
=> Started your app.

=> App running at: http://localhost:3000/
`

but I can`t see any of the editor windows.

Does anyone know how to fix this?

I`m using semantic-segmentation-editor-1.1.2 on Ubuntu 16.04.

How can I get the data stored in .labels ?

I tried to read the data as:

labels= [int(line) for line in f]
and the feedback was:

File "/usr/lib/python3.5/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 4: invalid start byte

So how can I get the data?

How to use .pcd file produced by aerial photogrammetry?

Hi, I use your editor for labeling pcd point cloud data.
I made point cloud data file using drone and pix4d program.
There are x,y,z and r,g,b and scalar information in my point cloud data.
what data is in your sample(pointcloud_labeling.pcd)?

How can i save .json file?

Thank you for providing a good tool.

At the end of the labeling process, i press the 'J' key to view the json file.

I can see the json file, but i want to download json files.

How do I download automatically?

can not play the video

hi,The video can not be loaded in vimeo,is there any other choice to play the video?
thank you!

no pointcloud visualization

Hi, all I've install npm with version 1.6, and it's ok, after command
"meteor npm install
meteor --settings settings.json",
and I sucesfully change the setting.jason, and push some pcd file into the folder, after I log into the web browser, why no pcd visualization.? this is strange.
and it appears in the terminal like:
W20180920-17:23:57.041(8)? (STDERR) Error: ENOENT: no such file or directory, stat '/home/jean/semantic-segmentation-editor/mnt/image2/table_scene_lms400.pcd.labels'
W20180920-17:23:57.137(8)? (STDERR) Error: ENOENT: no such file or directory, stat '/home/jean/semantic-segmentation-editor/mnt/image2/table_scene_lms400.pcd.objects'

The navigator should not retrieve annotation data but only file names

Hi, thanks for sharing this great tool. Currently the only way to navigate to next/previous image is going back to the browsing mode and select the image. I think it's fine because it only costs a small fraction of time comparing to finish a segmentation label. However, I found it become much slower when I have more than a thousand labels in the MongoDB. Then I checked the requests:

image

and also the preview of the response
image

It downloads every single record in the system every time when going back to the file browsing mode. So the whole system will become slower and slower over the time. I'm trying to figure out how to fix this issue, but I'm not familiar with some part of the tech stack used in this project. Would be grateful if someone could help.

** I use the suggested docker image jshimko/meteor-launchpad:latest and chrome browser

Image to Pointcloud back projection

Are there any plans to merge your annotation tools to support the ability to automatically label a velodyne scan by back projecting the labels in the corresponding image?

How to export all the labels result?

How to export the labels ? sorry for I didn't find where to export all the label json.
And the Show Json output button failed to show the json 😢

how to use API

maybe a little stupid but I tried for a while and stilll don't know where to use API command...Is that truly a command ? Under which directory should I input that command ?

Add a way to export all annotated data

I've annotated a couple hundred images using the tool and plan to do more. In order to download the annotated image, I click download for each image. Is there a way to just download all images at once?

Could you share your Dockerfile?

Thanks for sharing this great tool. I actually run into some problems when running the docker image. Can't find the Dockerfile in the repo and on dockerhub. Could you share it? Thanks!

Running error on MacOS

Sorry to bother you, but this error drive me crazy, I did as the "readme.txt", and every time I input

meteor --settings settings.json

and blow come out

Your app is crashing. Here's the latest log:
/Users/apple/Documents/NN_Models/semantic-segmentation-editor/.meteor/local/build/programs/server/boot.js:475
}).run();
^
Error: Cannot find module '@babel/runtime/helpers/builtin/interopRequireDefault'
at Function.Module._resolveFilename (module.js:547:15)
at Function.resolve (internal/module.js:18:19)
at Object.require (/Users/apple/Documents/NN_Models/semantic-segmentation-editor/.meteor/local/build/programs/server/boot.js:288:32)
at makeInstallerOptions.fallback (packages/modules-runtime.js:651:18)
at require (packages/modules-runtime.js:244:16)
at livedata_connection.js (/Users/apple/Documents/NN_Models/semantic-segmentation-editor/.meteor/local/build/programs/server/packages/ddp-client.js:147:30)
at fileEvaluate (packages/modules-runtime.js:343:9)
at require (packages/modules-runtime.js:238:16)
at namespace.js (packages/ddp-client/common/namespace.js:1:300)
at fileEvaluate (packages/modules-runtime.js:343:9)
Exited with code: 1
Your application is crashing. Waiting for file change.

I google it , and someone say I should install babel, and I did it, but nothing happened, wait for your reply!

Empty file from PCD output

I am looking for an segmentation tool which will filter only the point cloud that I am interested in. Take the demo point cloud sever as an example. I have segmented out the car manually. But when I click the "PCD output", I get a PCD file with 0kb size. Is this a bug, could I output a PCD file with only the point cloud I am interested in?

Should only load information about one image when entering editor mode

Hi, I faced another performance issue. When label number approaching ten thousand I found the speed of entering editing mode becomes much slower again. Then I check the network and see this response.

image

I grep the keyword "removed" and found nothing meaningful. Could you give me a hint about how to fix this? Thanks.

TypeError: Cannot destructure property `imagesFolder` of 'undefined' or 'null'.

After spenting 2 hours of install meteor and depencies, I succeed to build it. But when try to run, I got this error.
Is there any suggestion?
W20180730-18:21:40.261(8)? (STDERR) Error while parsing config.json
W20180730-18:21:40.348(8)? (STDERR) C:\Users****\AppData\Local.meteor\packages\meteor-tool\1.6.1_3\mt-os.windows.x86_64\dev_bundle\server-lib\node_modules\fibers\future.js:280
W20180730-18:21:40.350(8)? (STDERR) throw(ex);
W20180730-18:21:40.350(8)? (STDERR) ^
W20180730-18:21:40.351(8)? (STDERR)
W20180730-18:21:40.352(8)? (STDERR) TypeError: Cannot destructure property imagesFolder of 'undefined' or 'null'.
W20180730-18:21:40.352(8)? (STDERR) at api.js (server/api.js:13:61)
W20180730-18:21:40.353(8)? (STDERR) at fileEvaluate (packages\modules-runtime.js:343:9)
W20180730-18:21:40.353(8)? (STDERR) at require (packages\modules-runtime.js:238:16)
W20180730-18:21:40.354(8)? (STDERR) at D:\Detection\AnnotationTools\semantic-segmentation-editor.meteor\local\build\programs\server\app\app.js:1015:1
W20180730-18:21:40.354(8)? (STDERR) at D:\Detection\AnnotationTools\semantic-segmentation-editor.meteor\local\build\programs\server\boot.js:411:36
W20180730-18:21:40.357(8)? (STDERR) at Array.forEach ()
W20180730-18:21:40.358(8)? (STDERR) at D:\Detection\AnnotationTools\semantic-segmentation-editor.meteor\local\build\programs\server\boot.js:220:19
W20180730-18:21:40.359(8)? (STDERR) at D:\Detection\AnnotationTools\semantic-segmentation-editor.meteor\local\build\programs\server\boot.js:471:5
W20180730-18:21:40.368(8)? (STDERR) at Function.run (D:\Detection\AnnotationTools\semantic-segmentation-editor.meteor\local\build\programs\server\profile.js:510:12)
W20180730-18:21:40.372(8)? (STDERR) at D:\Detection\AnnotationTools\semantic-segmentation-editor.meteor\local\build\programs\server\boot.js:470:11
=> Exited with code: 1
W20180730-18:21:46.480(8)? (STDERR) Error while parsing config.json

Add support for RGB pointcloud

I'm trying to annotate an xyzrgb pcd file (some plants) via this tool.But I found that it is difficult to distinguish where the background and where the leaves is.If the point has its origional color,it would be more easier.Maybe a botten to switch the view between colored view and labled view would help?

how to input my point could data

@dmandrioli i know how to use tha eiitor follow the readme.txt, but i'm confused how to imput my data, i didn't find any information about how to input my own point cloud data. wolud you please tell me how to solve the problem.
Thanks, looking forward your reply!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.