1 Star 3 Fork 4

liux / label-tool

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

Image Labeling Tool

This web app allows you to label images, draw bounding boxes, shapes, collect information in forms with dropdowns, checkboxes and inputs.

The labeling UI provides a lot of features for drawing polygon shapes, editing them with assisted tracing with auto-tracing based on edges or an external ML model.

Use it when you need to segment and label multiple images, either yourself or by a group. This tool makes it easy to gather and later export the data in a format compatible with LabelMe. You can use this tool as an alternative to self-hosted tools like LabelMe, js-segment-annotator, etc or hosted services like LabelBox.

Labeling Demo

Demo of the labeling interface with all data served statically (no persistence, reverts on refresh).

Screenshots

Bounding box labeling:

Segmentation with polygons:

Automatic tracing:

Assisted segmentation with Tensor Flow Serving:

Project configuration and custom labeling UI:

Development

Install npm packages for client, server and the top-level folder:

yarn install
cd server && yarn install && cd ..
cd client && yarn install && cd ..

The server will run migrations on the first run if the database file doesn't exist already.

Run in the development mode:

env PORT=3000 API_PORT=3001 yarn start

Build For Production

Build the client app:

cd client && yarn run build && cd ..

Now you can run the server app in prod mode serving the client build:

env PORT=80 NODE_ENV=production node server/src/index.js

Config

The following environment variables can be tweaked:

  • PORT - the part the app is served on (dev, prod)
  • API_PORT - to differentiate the port for the API to run on (should be only used in dev)
  • UPLOADS_PATH - absolute path where the app stores uploaded images, defaults to server's folder 'uploads'
  • DATABASE_FILE_PATH - absolute path of the file where the app stores the SQLite data. Defaults to database.sqlite in the server folder
  • ADMIN_PASSWORD - sets a simple password on all non-labeler actions (stored in a hased form).

Run in Docker

The default Dockerfile points to /uploads and /db/db.sqlite for persisted data, make sure to prepare those in advance to be mounted over. Here is an example mounting a local host directory:

mkdir ~/containersmnt/
mkdir ~/containersmnt/db/
mkdir ~/containersmnt/uploads/

Now build the container:

docker build -t imslavko/image-labeling-tool .

Run attaching the mounts:

docker run -p 5000:3000 -u $(id -u):$(id -g) -v ~/containersmnt/uploads:/uploads -v ~/containersmnt/db:/db -d imslavko/image-labeling-tool

Access the site at localhost:5000.

Run with docker-compose

  • Checkout the docker-compose.yml for detailed configuration.
  • Need to set & export environment variable CURRENT_UID before running.
# if it needs to build the docker image,
CURRENT_UID=$(id -u):$(id -g) docker-compose up -d --build

# if it only needs to run,
CURRENT_UID=$(id -u):$(id -g) docker-compose up -d

Project Support and Development

This project has been developed as part of my internship at the NCSOFT Vision AI Lab in the beginning of 2019.

MIT License Copyright (c) 2019 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.

简介

图像标注工具整合进平台 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/liu_xian/label-tool.git
git@gitee.com:liu_xian/label-tool.git
liu_xian
label-tool
label-tool
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891