All Projects → kyamagu → Js Segment Annotator

kyamagu / Js Segment Annotator

Licence: bsd-3-clause
Javascript image annotation tool based on image segmentation.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Js Segment Annotator

ResUNetPlusPlus
Official code for ResUNetplusplus for medical image segmentation (TensorFlow implementation) (IEEE ISM)
Stars: ✭ 69 (-85.59%)
Mutual labels:  image-segmentation
Surface Defect Detection
🐎📈 Constantly summarizing open source dataset and important critical papers in the field of surface defect research which are very important. 🐋
Stars: ✭ 287 (-40.08%)
Mutual labels:  image-segmentation
U Net
U-Net: Convolutional Networks for Biomedical Image Segmentation
Stars: ✭ 374 (-21.92%)
Mutual labels:  image-segmentation
Image-Segmentation-Loss-Functions
some loss functions of image segmentation
Stars: ✭ 56 (-88.31%)
Mutual labels:  image-segmentation
Geospatial Machine Learning
A curated list of resources focused on Machine Learning in Geospatial Data Science.
Stars: ✭ 289 (-39.67%)
Mutual labels:  image-segmentation
Neural Pipeline
Neural networks training pipeline based on PyTorch
Stars: ✭ 315 (-34.24%)
Mutual labels:  image-segmentation
HyperDenseNet pytorch
Pytorch version of the HyperDenseNet deep neural network for multi-modal image segmentation
Stars: ✭ 58 (-87.89%)
Mutual labels:  image-segmentation
Caer
High-performance Vision library in Python. Scale your research, not boilerplate.
Stars: ✭ 452 (-5.64%)
Mutual labels:  image-segmentation
Segmentation models
Segmentation models with pretrained backbones. Keras and TensorFlow Keras.
Stars: ✭ 3,575 (+646.35%)
Mutual labels:  image-segmentation
Pixellib
Visit PixelLib's official documentation https://pixellib.readthedocs.io/en/latest/
Stars: ✭ 327 (-31.73%)
Mutual labels:  image-segmentation
Kaggle Carvana Image Masking Challenge
Stars: ✭ 256 (-46.56%)
Mutual labels:  image-segmentation
Fewshot gan Unet3d
Tensorflow implementation of our paper: Few-shot 3D Multi-modal Medical Image Segmentation using Generative Adversarial Learning
Stars: ✭ 272 (-43.22%)
Mutual labels:  image-segmentation
Kaggle salt bes phalanx
Winning solution for the Kaggle TGS Salt Identification Challenge.
Stars: ✭ 317 (-33.82%)
Mutual labels:  image-segmentation
Image Segmentation
Implementation of FCN (8/16/32) in Tensorflow. 🌀 在TensorFlow框架下实现 FCN (全卷积神经网络) 。
Stars: ✭ 19 (-96.03%)
Mutual labels:  image-segmentation
Pytorch Nested Unet
PyTorch implementation of UNet++ (Nested U-Net).
Stars: ✭ 416 (-13.15%)
Mutual labels:  image-segmentation
uformer-pytorch
Implementation of Uformer, Attention-based Unet, in Pytorch
Stars: ✭ 54 (-88.73%)
Mutual labels:  image-segmentation
Segmentation models.pytorch
Segmentation models with pretrained backbones. PyTorch.
Stars: ✭ 4,584 (+856.99%)
Mutual labels:  image-segmentation
Pytorch Unet
Simple PyTorch implementations of U-Net/FullyConvNet (FCN) for image segmentation
Stars: ✭ 470 (-1.88%)
Mutual labels:  image-segmentation
Cvpr2021 Papers With Code
CVPR 2021 论文和开源项目合集
Stars: ✭ 7,138 (+1390.19%)
Mutual labels:  image-segmentation
Medpy
Medical image processing in Python
Stars: ✭ 321 (-32.99%)
Mutual labels:  image-segmentation

JS Segment Annotator

Javascript image annotation tool based on image segmentation.

  • Label image regions with mouse.
  • Written in vanilla Javascript, with require.js dependency (packaged).
  • Pure client-side implementation of image segmentation.

A browser must support HTML canvas to use this tool.

There is an online demo.

Importing data

Prepare a JSON file that looks like the following. The required fields are labels and imageURLs. The annotationURLs are for existing data and can be omitted. Place the JSON file inside the data/ directory.

{
  "labels": [
    "background",
    "skin",
    "hair",
    "dress",
    "glasses",
    "jacket",
    "skirt"
  ],
  "imageURLs": [
    "data/images/1.jpg",
    "data/images/2.jpg"
  ],
  "annotationURLs": [
    "data/annotations/1.png",
    "data/annotations/2.png"
  ]
}

Then edit main.js to point to this JSON file. Open a Web browser and visit index.html.

Known issues

Browser incompatibility

A segmentation result can greatly differ due to the difference in Javascript implementation across Web browsers. The difference stems from numerical precision of floating point numbers, and there is no easy way to produce the exact same result across browsers.

Python tips

Annotation PNG

The annotation PNG file contains label map encoded in RGB value. Do the following to encode an index map.

import numpy as np
from PIL import Image

# Decode
encoded = np.array(Image.open('data/annotations/1.png'))
annotation = np.bitwise_or(np.bitwise_or(
    encoded[:, :, 0].astype(np.uint32),
    encoded[:, :, 1].astype(np.uint32) << 8),
    encoded[:, :, 2].astype(np.uint32) << 16)

print(np.unique(annotation))

# Encode
Image.fromarray(np.stack([
    np.bitwise_and(annotation, 255),
    np.bitwise_and(annotation >> 8, 255),
    np.bitwise_and(annotation >> 16, 255),
    ], axis=2).astype(np.uint8)).save('encoded.png')

JSON

Use JSON module.

import json

with open('data/example.json', 'r') as f:
    dataset = json.load(f)

Using dataURL

Do the following to convert between dataURL and NumPy format.

from PIL import Image
import base64
import io

# Encode
with io.BytesIO() as buffer:
    encoded.save(buffer, format='png')
    data_url = b'data:image/png;base64,' + base64.b64encode(buffer.getvalue())

# Decode
binary = base64.b64decode(data_url.replace(b'data:image/png;base64,', b''))
encoded = Image.open(io.BytesIO(binary))

Matlab tips

Annotation PNG

The annotation PNG file contains label map encoded in RGB value. Do the following to encode an index map.

% Decode

X = imread('data/annotations/0.png');
annotation = X(:, :, 1);
annotation = bitor(annotation, bitshift(X(:, :, 2), 8));
annotation = bitor(annotation, bitshift(X(:, :, 3), 16));

% Encode

X = cat(3, bitand(annotation, 255), ...
           bitand(bitshift(annotation, -8), 255), ...
           bitand(bitshift(annotation, -16)), 255));
imwrite(uint8(X), 'data/annotations/0.png');

JSON

Use the matlab-json package.

Using dataURL

Get the byte encoding tools.

Do the following to convert between dataURL and Matlab format.

% Decode

dataURL = 'data:image/png;base64,...';
png_data = base64decode(strrep(dataURL, 'data:image/png;base64,', ''));
annotation = imdecode(png_data, 'png');

% Encode

png_data = imencode(annotation, 'png');
dataURL = ['data:image/png;base64,', base64encode(png_data)];

Citation

We appreciate if you cite the following article in an academic paper. The tool was originally developed for this work.

@article{tangseng2017looking,
Author        = {Pongsate Tangseng and Zhipeng Wu and Kota Yamaguchi},
Title         = {Looking at Outfit to Parse Clothing},
Eprint        = {1703.01386v1},
ArchivePrefix = {arXiv},
PrimaryClass  = {cs.CV},
Year          = {2017},
Month         = {Mar},
Url           = {http://arxiv.org/abs/1703.01386v1}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].