1 Star 0 Fork 0

igi123/semantic-segmentation-editor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Semantic Segmentation Editor

A web based labeling editor dedicated to the creation of training data for machine learning. The tool has been developed in the context of autonomous driving research. It supports images (.jpg and .png files) and point clouds (.pcd files). It is a Meteor app developed with React, Paper.js and three.js.

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

git clone https://github.com/Hitachi-Automotive-And-Industry-Lab/semantic-segmentation-editor
cd semantic-segmentation-editor

Change 'input-folder' and 'output-folder' according to your needs in settings.json

On Windows, use '/' separators, example "c:/Users/john/images"

meteor npm install
meteor --settings settings.json

Like any Meteor app, the editor will run by default on http://localhost:3000 (-p to change the port)

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

Running the app using Docker

A Docker image is available at https://hub.docker.com/r/hitachiail/semantic-segmentation-editor/

To run it:

docker pull hitachiail/semantic-segmentation-editor
docker run -it -p PORT:3000 -v INPUT_FOLDER:/mnt/images -v OUTPUT_FOLDER:/mnt/pcd hitachiail/semantic-segmentation-editor:latest

Replace PORT, INPUT_FOLDER and OUTPUT_FOLDER according to your needs.

Configuration File: settings.json

Modifying this file let's you configure where are stored data of the app as well as the sets of classes available in the tool.

{
  "configuration": {
    "input-folder": "/mnt/images", // The root folder containing images and PCD files
    "output-folder": "/mnt/pointcloud" // 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), clickon 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.

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
MIT License Copyright (c) 2018-present, Hitachi Automotive And Industry Laboratory Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Web-based labeling tool for camera and LIDAR data 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/igi123/semantic-segmentation-editor.git
git@gitee.com:igi123/semantic-segmentation-editor.git
igi123
semantic-segmentation-editor
semantic-segmentation-editor
master

搜索帮助