Skip to content

worree133/Labelme-for-Auto-Human-Segmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


HS-Labelme


Description

HS-Labelme is a graphical image annotation tool based on labelme. It supports some AI-assisted labeling features for human segmentation. All the functions support Undo with Ctrl+Z. It is written in Python and uses Qt for its graphical interface.

The first function "Model: P3M-Net" can label the human automatically.


The second function "Model: MatteFormer" can label different objects after the user draws trimaps. After drawing the gray part, right click the center area to fill it with white color.


The third function "Threshold Setting" can adjust the labeling boundary after using the first or second functions.

The fourth function "Replace Linestrip" can correct the labeling. Press Enter to confirm the corrected part.

Features

  • Auto-contouring for human segmentation
  • Video annotation.
  • GUI customization (predefined labels / flags, auto-saving, label validation, etc). (#144)
  • Exporting VOC-format dataset for semantic/instance segmentation.
  • Exporting COCO-format dataset for instance segmentation.

Requirements

  • Ubuntu / macOS / Windows
  • Python3.7/3.8/3.9/3.10
  • PyQt5

Installation

git clone https://github.com/worree133/Labelme-for-Auto-Human-Segmentation.git
cd Labelme-for-Auto-Human-Segmentation
python setup.py build
pip install .

Download the pretrained model from P3M-Net and MatteFormer.

Put the pretrained models to models/pretrained_models/

Create a info.txt in your current working directory to decide the label name.

In the info.txt, just type the label name of background in the first row and label name of foreground in the second row.

The sample info.txt can be checked in the source code.

Usage

Run hs_labelme --help for detail.
The annotations are saved as a JSON file.

hs_labelme  # just open gui

Acknowledgement

This repo is the fork of wkentaro/labelme. The models used are from: