Skip to content

yuta-hi/remove-island

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remove small islands from multiple-valued label

Installation

Install from this repository

git clone https://github.com/yuta-hi/remove-island
cd remove-island
pip install .

Usage

Let's assume that 5% of the object area is noise, and remove them.

from refine_label import remove_island

ret = remove_island(label_3d,
                    noise_ratio=5., #  [0., ..., 100.]
                    connectivity=6, #  [6, 18, 26]
                    metric='area',  #  ['area', 'bbox_area', 'convex_area', 'filled_area']
                    cval=0,
                    only_largest=False)

About

Remove small islands from multiple-valued label

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages