This repository contains the implementation of our paper "H2Former: An Efficient Hierarchical Hybrid Transformer for Medical Image Segmentation"
python 3.6
numpy 1.16.4
Pytorch 1.8.1
pillow 7.0.0
opencv-python 4.1.0
-
Clone the repository, and download the pre-trained ImaenNet model, put them into ./ folder. The details of the training are in train.py file.
-
And then run the code:python train.py Note that the parameters and paths should be set beforehand
-
Once the training is complete, you can run the test.py to test your model. Run the code : python test.py.
Code can only be used for ACADEMIC PURPOSES. NO COMERCIAL USE is allowed. Copyright © College of Computer Science, Nankai University. All rights reserved.