Git Product home page Git Product logo

tcct's Introduction

Solutions for MICCAI2022-GOALS@Baidu

The project's code is constantly being updated!

  • Network Structure TCCT-ViT&CNN combined Net

  • Feature Polarization TCCT-Feature Polarization

  • Visualization for Segmentation TCCT-Segmentation Results

Prerequisites

  • Python 3.8
  • Paddle 2.3.2
  • Pytorch 1.13.0

Task1:Layer Segmentation

Model:TCCT/PyTorch
Project for task1:Segmentation
    ├── data (code for datasets)
        ├── tran.py (some python imports)  
        ├── octnpy.py (parent class for OCT datasets)  
        ├── octgen.py (child class for OCT datasets)  
        └── ...  
    ├── kite (package for segmentation with torch)  
        ├── loop_seg.py (child class for training)  
        ├── loopback.py (parent class for training)  
        ├── main.py   
        └── ...  
    ├── nets (related models)  
        ├── fcp.py (Feature Polarization Loss - file1)  
        ├── fcs.py (Feature Polarization Loss - file2)  
        ├── reg.py (loss functions [feature polarization & boundary regression])  
        ├── tcct.py (Tightly combined Cross-Convolution and Transformer)  
        └── ...   
    ├── pnnx (trained weights)  
        ├── onnx.py (code to inference OCT images with *.onnx files)  
        └── ...   

And for the training on GOALS dataset, run the command

CUDA_VISIBLE_DEVICES=0 python kite/main.py --bs=8 --net=stc_tt --los=di --epochs=100 --db=goals

And for the training on HCMS dataset, run the command

CUDA_VISIBLE_DEVICES=1 python kite/main.py --bs=8 --net=stc_tt --los=di --epochs=100 --db=hcms

Citation

If you would like to use the code, please cite our work.

Y. Tan et al., "Retinal Layer Segmentation in OCT images with Boundary Regression and Feature Polarization," in IEEE Transactions on Medical Imaging, doi: 10.1109/TMI.2023.3317072.
@article{tan2023tcct,
  author={Tan, Yubo and Shen, Wen-Da and Wu, Ming-Yuan and Liu, Gui-Na and Zhao, Shi-Xuan and Chen, Yang and Yang, Kai-Fu and Li, Yong-Jie},
  journal={IEEE Transactions on Medical Imaging}, 
  title={Retinal Layer Segmentation in OCT images with Boundary Regression and Feature Polarization}, 
  year={2023},
  ISSN={1558-254X},
  doi={10.1109/TMI.2023.3317072},
  publisher={IEEE}
}

Task2:Glaucoma Classification

Model:ResNet/Paddle
  • Training:
    "python t2_train.py --gpu=0"
  • Ensemble:
    "python t2_ensemble.py --root=xxx --gpu=0"

Contact

tcct's People

Contributors

tyb311 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar tfyzft avatar Li Xiang avatar  avatar

Watchers

 avatar

tcct's Issues

Issue with Inference using onnx_infer.py - Non-zero status code returned while running AveragePool node

However, I encountered an issue while using the onnx_infer.py script from the provided source code for inference. Specifically, I am getting the following error:

read: (160, 160, 3)
img.shape (1, 3, 160, 160)
2024-03-24 17:51:37.248948420 [E:onnxruntime:, sequential_executor.cc:494 ExecuteKernel] Non-zero status code returned while running AveragePool node. Name:'AveragePool_191' Status Message: pool.cc:123 Compute kernel_shape num_dims is not compatible with X num_dims.
Traceback (most recent call last):
File "onnx_infer.py", line 44, in
ret = net.forward(img)
File "onnx_infer.py", line 27, in forward
out = self.session.run(None, {"input": img}, )[0].squeeze()
File "/home/dxzhang/miniconda3/envs/yolov7/lib/python3.7/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 200, in run
return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running AveragePool node. Name:'AveragePool_191' Status Message: pool.cc:123 Compute kernel_shape num_dims is not compatible with X num_dims.

Steps to Reproduce
Clone the repository from [GitHub link]
Navigate to the task1 directory
Run the onnx_infer.py script with the provided image

Expected Behavior
I expect the onnx_infer.py script to successfully run inference on the provided image without any errors.

Environment
Linux
Python version: 3.7.13
onnxruntime version: 1.14.1

I would appreciate any guidance or suggestions on how to resolve this issue. Thank you.

pretrained model setting

Hello, I would like to ask about the .pt file of the goals task in task1. Are there any adjustments to the input size and any augmentation during pre-training?

Is it possible to download the dataset?

Hi

Thanks for sharing your code.
Is it possible to download the whole dataset that you used for training your models? Also, it would be so much helpful if you could share your trained models.

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.