A Pytorch Segmentation module through implicit way (support 2d and 3d)
# via pip
pip install git+https://github.com/Project-Splinter/ImplicitSegCUDA --upgrade
# via git clone
git clone https://github.com/Project-Splinter/ImplicitSegCUDA
cd human_inst_seg
python setup.py develop
Note to run demo.py
with --vis
option, you also need to additional dependence: vtkplotter
and trimesh
and skimage
.
First mkdir ./data
, then download image.png
(here) and sdf.pth
(here), and put them under ./data
.
# 2d
python test/check_seg2d.py --mask ./data/image.png --mode lossless --vis
python test/check_seg2d.py --mask ./data/image.png --mode topk --vis
# 3d
python test/check_seg3d.py --voxel ./data/sdf.pth --mode lossless --vis
python test/check_seg3d.py --voxel ./data/sdf.pth --mode topk --vis
Note: Seg3dTopk
and Seg3dLossless
are both instances of nn.Module
, so you need to be carefull when you want to integrate this to other trainable model.