Coder Social home page Coder Social logo

gewelsji / vps Goto Github PK

View Code? Open in Web Editor NEW
168.0 7.0 25.0 232.42 MB

Official website for "Video Polyp Segmentation: A Deep Learning Perspective (MIR 2022)"

License: Apache License 2.0

Python 70.15% CMake 0.79% C++ 15.73% C 1.70% Cuda 10.53% Shell 1.11%
video-polyp-segmentation video-object-segmentation awesome-polyp-segmentation polyp-segmentation colonoscopy medical-image-segmentation medical-image-analysis pytorch deep-learning jittor

vps's Introduction

Video Polyp Segmentation: A Deep Learning Perspective (MIR 2022)

license: mit LAST COMMIT ISSUES STARS ARXIV PAPER Gitter PWC PWC


MIR.Series.Video.Polyp.Segmentation-.A.Deep.Learning.Perspective_compressed.mp4

Contents

1. Features

In the deep learning era, we present the first comprehensive video polyp segmentation (VPS) study. Over the years, developments on VPS have not moved forward with ease since large-scale fine-grained segmentation masks are still not made publicly available. To tackle this issue, we first introduce a long-awaited high-quality per-frame annotated VPS dataset. There are four features of our work:

  • VPS Dataset: We recognize the importance of annotated medical data for substantial progress in research on medical AI systems’ development. Thus, our SUN-SEG dataset is open access, a non-profit database of the high-quality, large-scale, densely annotated dataset for facilitating colonoscopy diagnosis, localization, and derivative tasks. Our vision aims to provide data and knowledge to aid and educate clinicians, and also for the development of automated medical decision support systems.
  • VPS Baseline: We propose a simple but efficient baseline, which outperforms the 13 cutting-edge polyp segmentation approaches and runs in super real-time (170fps). We hope such a baseline could attract more researchers to join our community and inspire them to develop more interesting solutions.
  • VPS Benchmark: For a fair comparison, we build an online leaderboard to keep up with the new progress of the VPS community. Besides, we provide an out-of-the-box evaluation toolbox for the VPS task.
  • Tracking Trends: We elaborately collect a paper reading list ( 💥 Awesome Paper List 💥 ) to continuously track the latest updates in this rapidly advancing field.

2. News

  • [Jul/15/2024] Thanks to @Jingyi Liu for pointing out some index issues in the bounding box labels of our SUN-SEG-Hard-Unseen, which affected 154 samples. Everything is now fixed, so please refer to the link (google drive) for the updated information.
  • [Oct/26/2023] The video-level attributes have released at Google Drive.
  • [Jan/30/2023] We update the bounding box annotation with COCO-like format, ie, [x,y,width,height] where x and y are the upper-left coordinates of the bounding box. Please download the latest compressed file at here. Thanks for Yingling Lu for pointing out this issue.
  • [August/24/2022] 💥 Our paper has been accepted by Machine Intelligence Research (MIR) journal.
  • [July/03/2022] 💥 We update a new version of SUN-SEG with more fine-grained data splits, including seen/unseen scenarios. For more details refer to our technical report. Also, the new PaperWithCode page refers to SUN-SEG-Easy & SUN-SEG-Hard.
  • [May/11/2022] Release rejected labels: SUN-SEG-Rejected-Labels (Google Drive, 120.7MB). For more details see here.
  • [March/27/2022] Release pretrained checkpoints and whole benchamrks results.
  • [March/18/2022] Upload the whole training/testing code for our enhanced model PNS+.
  • [March/15/2022] Release the evaluation toolbox for the VPS task. Add a Awesome_Video_Polyp_Segmentation.md for tracking latest trends of this community.
  • [March/14/2022] Create the project page.

3. VPS Dataset


Figure 1: Annotation of SUN-SEG dataset. The object-level segmentation masks in the SUN-SEG dataset of different pathological categories, which is densely annotated with experienced annotators and verified by colonoscopy-related researchers to ensure the quality of the proposed dataset.

Notably, based on some necessary privacy-preserving considerations from the SUN dataset, we could not directly share the download link of the video dataset with you without authorization. And please inform us of your institution and the purpose of using SUN-SEG in the email. Thank you for your understanding!

  • How to get access to our SUN-SEG dataset? Please refer to DATA_PREPARATION.
  • If you wanna know more descriptions about our SUN-SEG dataset. Please refer to our DATA_DESCRIPTION.md.

4. VPS Baseline

This work is the extension version of our conference paper (Progressively Normalized Self-Attention Network for Video Polyp Segmentation) accepted at MICCAI-2021. More details could refer to arXiv and Github Link


Figure 2: The pipeline of the proposed (a) PNS+ network, which is based on (b) the normalized self-attention (NS) block.

There are three simple-to-use steps to access our project code (PNS+):

  • Prerequisites of environment:

      conda create -n PNS+ python=3.6
      conda activate PNS+
      conda install pytorch=1.1.0 torchvision -c pytorch
      pip install tensorboardX tqdm Pillow==6.2.2
      pip install git+https://github.com/pytorch/tnt.git@master
  • Compiling the project:

    cd ./lib/PNS
    python setup.py build develop
  • Training:

    python ./scripts/my_train.py
  • Testing:

    Downloading pre-trained weights and move it into snapshot/PNSPlus/epoch_15/PNSPlus.pth, which can be found in this download link: Google Drive, 102.9MB / Baidu Drive (Password: g7sa, Size: 108MB).

    python ./scripts/my_test.py

5. VPS Benchmark

We provide an out-of-the-box evaluation toolbox for the VPS task, which is written in Python style. You can just run it to generate the evaluation results on your custom approach. Or you can directly download the complete VPS benchmark including the prediction map of each competitor at the download link: Google Drive, 5.45GB / Baidu Drive (Password: 2t1l, Size: 5.45G).

  • More instructions about Evaluation Toolbox refer to PageLink.

We also built an online leaderboard to keep up with the new progress of other competitors. We believe this is a fun way to learn about new research directions and stay in tune with our VPS community.

Here, we present a variety of qualitative and quantitative results of VPS benchmarks:

  • Visual prediction of top-performance competitors:


Figure 3: Qualitative comparison of three video-based models (PNS+, PNSNet, and 2/3D) and two image-based models (ACSNet, and PraNet).

  • Model-based performance:


Figure 4: Quantitative comparison on two testing sub-datasets, i.e., SUN-SEG-Easy (Unseen) and SUN-SEG-Hard (Unseen). `R/T' represents we re-train the non-public model, whose code is provided by the original authors. The best scores are highlighted in bold.

  • Attribute-based performance:


Figure 5: Visual attributes-based performance on our SUN-SEG-Easy (Unseen) and SUN-SEG-Hard (Unseen) in terms of structure measure.

6. Tracking Trends


To better understand the development of this field and to quickly push researchers in their research process, we elaborately build a Paper Reading List. It includes 119 colonoscopy imaging-based AI scientific research in the past 12 years. It includes several fields, such as image polyp segmentation, video polyp segmentation, image polyp detection, video polyp detection, and image polyp classification. Besides, we will provide some interesting resources about human colonoscopy.

Note: If we miss some treasure works, please let me know via e-mail or directly push a PR. We will work on it as soon as possible. Many thanks for your active feedback.

7. Citations

If you have found our work useful, please use the following reference to cite this project:

@article{ji2022video,
  title={Video polyp segmentation: A deep learning perspective},
  author={Ji, Ge-Peng and Xiao, Guobao and Chou, Yu-Cheng and Fan, Deng-Ping and Zhao, Kai and Chen, Geng and Van Gool, Luc},
  journal={Machine Intelligence Research},
  volume={19},
  number={6},
  pages={531--549},
  year={2022},
  publisher={Springer}
}


@inproceedings{ji2021progressively,
  title={Progressively normalized self-attention network for video polyp segmentation},
  author={Ji, Ge-Peng and Chou, Yu-Cheng and Fan, Deng-Ping and Chen, Geng and Fu, Huazhu and Jha, Debesh and Shao, Ling},
  booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
  pages={142--152},
  year={2021},
  organization={Springer}
}

@inproceedings{fan2020pranet,
  title={Pranet: Parallel reverse attention network for polyp segmentation},
  author={Fan, Deng-Ping and Ji, Ge-Peng and Zhou, Tao and Chen, Geng and Fu, Huazhu and Shen, Jianbing and Shao, Ling},
  booktitle={International conference on medical image computing and computer-assisted intervention},
  pages={263--273},
  year={2020},
  organization={Springer}
}

8. FAQ

9. License

The dataset and source code is free for research and education use only. Any commercial usage should get formal permission first.

  • Video Source: SUN (Showa University and Nagoya University) Colonoscopy Video Database is the colonoscopy video database for the evaluation of automated colorectal-polyp detection. The database comprises still images of videos, which are collected at the Showa University Northern Yokohama Hospital. Mori Laboratory, Graduate School of Informatics, Nagoya University developed this database. Every frame in the database was annotated by the expert endoscopists at Showa University.

  • Intended Use: This database is available for only non-commercial use in research or educational purposes. As long as you use the database for these purposes, you can edit or process images and annotations in this database. Without permission from Mori Lab., commercial use of this dataset is prohibited even after copying, editing, processing, or any operations of this database. Please contact us for commercial use or if you are uncertain about the decision.

  • Distribution: It is prohibited to sell, transfer, lend, lease, resell, distribute, etc., as it is, or copy, edit, or process this database, in whole or in part.

10. Acknowledgments

  • Our dataset is built upon the SUN (Showa University and Nagoya University) Colonoscopy Video Database, Thanks very much for their wonderful work!
  • This codebase is based on our conference version PNSNet, which is accepted by the MICCAI-2021 conference.

vps's People

Contributors

dengpingfan avatar gewelsji avatar johnson111788 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vps's Issues

the issue about dataloader ?

for idx, (img, label) in enumerate(zip(img_li, label_li)):
if idx == 0:
IMG = torch.zeros(len(img_li), *(img.shape))
LABEL = torch.zeros(len(img_li) - 1, *(label.shape))
IMG[idx, :, :, :] = img
else:
IMG[idx, :, :, :] = img
LABEL[idx - 1, :, :, :] = label

so, why LABEL has less frame than IMG ? i 've been confused about it ?

编译报错

你好,使用linux编译会报错怎么解决?
4

编译报错

编译时遇到这个错误该如何解决?

67BDF32F1941A07991A192125ADF61BA

import error

hi,
First of all, thank you for your excellent work.
when I try to train, I get the following error:

ImportError: self_cuda_backend.cpython-36m-x86_64-linux-gnu.so: undefined symbol _ZN6caffe26detail36_typeMetaDataInstance_preallocated_7E.

And this is reported when running the PNSPlusMoudle.py.
My OS is centos7, Cuda version is 10.0, PyTorch version is 1.1, GPU is titan XP with 12GB memory.

Hello, I need your help!

Hello, I am a newcomer to video segmentation and want to try the video segmentation project, is there any baseline that is more suitable for novices?

Cannot run my_train.py because of "ModuleNotFoundError: No module named 'self_cuda_backend'

During running the script my_train.py, I get this error: -

Traceback (most recent call last):
  File "./scripts/my_train.py", line 14, in <module>
    from lib.module.PNSPlusNetwork import PNSNet as Network
  File "/content/drive/Shareddrives/VPS/VPS_main/lib/module/PNSPlusNetwork.py", line 11, in <module>
    from module.PNSPlusModule import NS_Block
  File "/content/drive/Shareddrives/VPS/VPS_main/lib/module/PNSPlusModule.py", line 10, in <module>
    import self_cuda_backend as _ext
ModuleNotFoundError: No module named 'self_cuda_backend'

Now,, I did run build as instructed in the readme and it generates a lot of log, but this error appears over and over again: -

/content/drive/Shareddrives/VPS/VPS_main/lib/module/PNS
running build
running build_ext
/usr/local/lib/python3.7/dist-packages/torch/utils/cpp_extension.py:387: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
  warnings.warn(msg.format('we could not find ninja.'))
/usr/local/lib/python3.7/dist-packages/torch/utils/cpp_extension.py:788: UserWarning: The detected CUDA version (11.1) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem.
  warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'self_cuda_backend' extension
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.7/dist-packages/torch/include -I/usr/local/lib/python3.7/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.7/dist-packages/torch/include/TH -I/usr/local/lib/python3.7/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.7m -c PNS_Module/sa_ext.cpp -o build/temp.linux-x86_64-3.7/PNS_Module/sa_ext.o -std=c++11 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=self_cuda_backend -D_GLIBCXX_USE_CXX11_ABI=0
In file included from /usr/local/lib/python3.7/dist-packages/torch/include/torch/extension.h:4:0,
                 from PNS_Module/sa_ext.cpp:2:
/usr/local/lib/python3.7/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4:2: error: #error C++14 or later compatible compiler is required to use PyTorch.
 **#error C++14 or later compatible compiler is required to use PyTorch.**

I feel like build needs to run properly for the whole code to execute well. The problem is on Colab, the CUDA version is not 10.0 and there is no way to install C++ there. On my local machine, I only have support for Colab 11.0 and above. Is there any way to restructure this code for CUDA 11.0 or just run it using CPU?

How to get fps and real-time video view?

Hi, thanks to your nice work.

I am leaving a message because I have a question.
First, I want to find the fps. Second, I have an actual endoscopy video, and I want to make it into a video that shows the location of the lesion in real time, like your video. Is there any related code?

Help for dataset

Hello, I failed to get the SUN data set and failed to send the email. Could you please share the data set or help correct the email address? Thank you

Visual Attributes

First of all, thank you for this meaningful job!
Secondly, for the Visual Attributes you proposed, if I want to get the Visual Attributes corresponding to each picture, could you tell me where I should look for it?
e.g. image_name_00001.jpg --> IB , HO
image_name_00002.jpg --> FM , SO
......
3a8c04f37bd6dff9ffaa0c2bd3391dc

Quantitative comparison

Hello author! I can't find the metrics results or prediction maps of the image-based models on SUN-SEG-Easy/Hard Seen datasets. Can you provide the prediction maps or the trained weights? Thanks!

Data loading problem

Hello, the data set format is formatted according to the requirements, but this error occurs

File "./lib/dataloader/dataloader.py", line 32, in
int(name.split('-')[0].split('_')[-1]),
ValueError: invalid literal for int() with base 10: '00003.jpg'

I'm not sure what that is

编译报错

为什么运行python setup.py build develop会出现语法报错???我并没有更改它,而是直接从github下载得到的。
2

Some questions about your dataset.

Hi, sorry to bother you. I have some questions about your dataset, and I have tried to contact the author of the SUN dataset but got no response. So I still take the liberty to ask you.

It is mentioned in your document(https://github.com/GewelsJI/VPS/blob/main/docs/DATA_DESCRIPTION.md):
As such, it yields the final version of our SUN-SEG dataset, which includes 49,136 polyp frames (i.e., positive part) and 109,554 non-polyp frames (i.e., negative part) taken from different 285 and 728 colonoscopy videos clips, as well as the corresponding annotations. The following sections will provide details about our SUN-SEG point-by-point.

Are there only frames containing polyps in your videos in the positive part? And how do you use the non-polyp frames in your train
and test dataset? How do you deal with the non-polyp frames when you calculate evaluation such as Dice and so on?

Thank you very much and look forward to your reply.

Some errors when creating the environment

Hi, your work is respectable!But I have some problems. Could you please help me?
when i type
pip install git+https://github.com/pytorch/tnt.git@master
there are some errors occured.
image

By the way, when I run python setup.py build develop, I also have some problmes.

image

Regarding the role of the NS module in the model, why use two?

Hello, now I have something I don't understand about the NS module in the model, and I would like to ask you. If the role of the first NS module is to fuse local and global features, then what is the role of the second NS module, I look forward to receiving your reply.

Dataset Download

Thanks for your great work. I have contacted you by email ([email protected]). Can you provide me the link to download the dataset as soon as possible?

训练时报错

执行python ./scripts/my_train.py会报以下错误:
CUDA error at: PNS_Module/sa_ext.cpp:34
no kernel image is available for execution on the device cudaGetLastError()

The model root of vps_evaluator.py

Hello, I wonder where to place the test model(.pth) for the ./eval/vps_evaluator.py? I tried putting it under ./eval and ./VPS-MAIN, named 2022-TMI-PNSPlus.pth, but found that the evaluation result has nothing to do with my model. Looking forward to your reply, thanks a lot.

About this, how can I use it?

I downloaded the benchmark file, but I don't know how I should use it. Could you please tell me? Thanks!
“We provide an out-of-the-box evaluation toolbox for the VPS task, which is written in Python style. You can just run it to generate the evaluation results on your custom approach. Or you can directly download the complete VPS benchmark including prediction map of each competitor at download link: OneDrive / Baidu Drive (Password: 2t1l, Size: 5.45G).”

OneDrive link expired

Hi,
I am trying to download your annotations but the OneDrive link has expired and I cannot use the other link.
Could you please update it ?
Thank you

Hello, I need your help! I have some question about the evaluation metrics.

Hello, I observed that the code provides some evaluation indicators, in the path ' ./eval/eval-result', where maxDice and maxIou represent the maximum value or the average value? Notice that there is this code in the metrics.py: column_Iou = np.mean(self.threshold_Iou, axis=0).Looking forward to your reply!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.