|
| 1 | +# 2-PM Vessel Dataset |
| 2 | + |
| 3 | +## Description |
| 4 | + |
| 5 | +This project supports **`2-PM Vessel Dataset`**, which can be downloaded from [here](https://opendatalab.org.cn/2-PM_Vessel_Dataset). |
| 6 | + |
| 7 | +### Dataset Overview |
| 8 | + |
| 9 | +An open-source volumetric brain vasculature dataset obtained with two-photon microscopy at Focused Ultrasound Lab, at Sunnybrook Research Institute (affiliated with University of Toronto by Dr. Alison Burgess, Charissa Poon and Marc Santos). |
| 10 | + |
| 11 | +The dataset contains a total of 12 volumetric stacks consisting images of mouse brain vasculature and tumor vasculature. |
| 12 | + |
| 13 | +### Information Statistics |
| 14 | + |
| 15 | +| Dataset Name | Anatomical Region | Task Type | Modality | Num. Classes | Train/Val/Test Images | Train/Val/Test Labeled | Release Date | License | |
| 16 | +| ------------------------------------------------------------ | ----------------- | ------------ | ----------------- | ------------ | --------------------- | ---------------------- | ------------ | ------------------------------------------------------------- | |
| 17 | +| [2pm_vessel](https://opendatalab.org.cn/2-PM_Vessel_Dataset) | vessel | segmentation | microscopy_images | 2 | 216/-/- | yes/-/- | 2021 | [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/) | |
| 18 | + |
| 19 | +| Class Name | Num. Train | Pct. Train | Num. Val | Pct. Val | Num. Test | Pct. Test | |
| 20 | +| :--------: | :--------: | :--------: | :------: | :------: | :-------: | :-------: | |
| 21 | +| background | 216 | 85.78 | - | - | - | - | |
| 22 | +| vessel | 180 | 14.22 | - | - | - | - | |
| 23 | + |
| 24 | +Note: |
| 25 | + |
| 26 | +- `Pct` means percentage of pixels in this category in all pixels. |
| 27 | + |
| 28 | +### Visualization |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +### Dataset Citation |
| 33 | + |
| 34 | +``` |
| 35 | +@article{teikari2016deep, |
| 36 | + title={Deep learning convolutional networks for multiphoton microscopy vasculature segmentation}, |
| 37 | + author={Teikari, Petteri and Santos, Marc and Poon, Charissa and Hynynen, Kullervo}, |
| 38 | + journal={arXiv preprint arXiv:1606.02382}, |
| 39 | + year={2016} |
| 40 | +} |
| 41 | +``` |
| 42 | + |
| 43 | +### Prerequisites |
| 44 | + |
| 45 | +- Python v3.8 |
| 46 | +- PyTorch v1.10.0 |
| 47 | +- pillow(PIL) v9.3.0 |
| 48 | +- scikit-learn(sklearn) v1.2.0 |
| 49 | +- [MIM](https://github.com/open-mmlab/mim) v0.3.4 |
| 50 | +- [MMCV](https://github.com/open-mmlab/mmcv) v2.0.0rc4 |
| 51 | +- [MMEngine](https://github.com/open-mmlab/mmengine) v0.2.0 or higher |
| 52 | +- [MMSegmentation](https://github.com/open-mmlab/mmsegmentation) v1.0.0rc5 |
| 53 | + |
| 54 | +All the commands below rely on the correct configuration of `PYTHONPATH`, which should point to the project's directory so that Python can locate the module files. In `2pm_vessel/` root directory, run the following line to add the current directory to `PYTHONPATH`: |
| 55 | + |
| 56 | +```shell |
| 57 | +export PYTHONPATH=`pwd`:$PYTHONPATH |
| 58 | +``` |
| 59 | + |
| 60 | +### Dataset Preparing |
| 61 | + |
| 62 | +- download dataset from [here](https://opendatalab.org.cn/2-PM_Vessel_Dataset) and decompress data to path `'data/'`. |
| 63 | +- run script `"python tools/prepare_dataset.py"` to format data and change folder structure as below. |
| 64 | +- run script `"python ../../tools/split_seg_dataset.py"` to split dataset and generate `train.txt`, `val.txt` and `test.txt`. If the label of official validation set and test set can't be obtained, we generate `train.txt` and `val.txt` from the training set randomly. |
| 65 | + |
| 66 | +```shell |
| 67 | +mkdir data & cd data |
| 68 | +pip install opendatalab |
| 69 | +odl get 2-PM_Vessel_Dataset |
| 70 | +cd .. |
| 71 | +python tools/prepare_dataset.py |
| 72 | +python tools/prepare_dataset.py |
| 73 | +``` |
| 74 | + |
| 75 | +```none |
| 76 | + mmsegmentation |
| 77 | + ├── mmseg |
| 78 | + ├── projects |
| 79 | + │ ├── medical |
| 80 | + │ │ ├── 2d_image |
| 81 | + │ │ │ ├── microscopy_images |
| 82 | + │ │ │ │ ├── 2pm_vessel |
| 83 | + │ │ │ │ │ ├── configs |
| 84 | + │ │ │ │ │ ├── datasets |
| 85 | + │ │ │ │ │ ├── tools |
| 86 | + │ │ │ │ │ ├── data |
| 87 | + │ │ │ │ │ │ ├── train.txt |
| 88 | + │ │ │ │ │ │ ├── val.txt |
| 89 | + │ │ │ │ │ │ ├── images |
| 90 | + │ │ │ │ │ │ │ ├── train |
| 91 | + │ │ │ │ | │ │ │ ├── xxx.png |
| 92 | + │ │ │ │ | │ │ │ ├── ... |
| 93 | + │ │ │ │ | │ │ │ └── xxx.png |
| 94 | + │ │ │ │ │ │ ├── masks |
| 95 | + │ │ │ │ │ │ │ ├── train |
| 96 | + │ │ │ │ | │ │ │ ├── xxx.png |
| 97 | + │ │ │ │ | │ │ │ ├── ... |
| 98 | + │ │ │ │ | │ │ │ └── xxx.png |
| 99 | +
|
| 100 | +``` |
| 101 | + |
| 102 | +### Divided Dataset Information |
| 103 | + |
| 104 | +***Note: The table information below is divided by ourselves.*** |
| 105 | + |
| 106 | +| Class Name | Num. Train | Pct. Train | Num. Val | Pct. Val | Num. Test | Pct. Test | |
| 107 | +| :--------: | :--------: | :--------: | :------: | :------: | :-------: | :-------: | |
| 108 | +| background | 172 | 85.88 | 44 | 85.4 | - | - | |
| 109 | +| vessel | 142 | 14.12 | 38 | 14.6 | - | - | |
| 110 | + |
| 111 | +### Training commands |
| 112 | + |
| 113 | +To train models on a single server with one GPU. (default) |
| 114 | + |
| 115 | +```shell |
| 116 | +mim train mmseg ./configs/${CONFIG_FILE} |
| 117 | +``` |
| 118 | + |
| 119 | +### Testing commands |
| 120 | + |
| 121 | +To test models on a single server with one GPU. (default) |
| 122 | + |
| 123 | +```shell |
| 124 | +mim test mmseg ./configs/${CONFIG_FILE} --checkpoint ${CHECKPOINT_PATH} |
| 125 | +``` |
| 126 | + |
| 127 | +<!-- List the results as usually done in other model's README. [Example](https://github.com/open-mmlab/mmsegmentation/tree/dev-1.x/configs/fcn#results-and-models) |
| 128 | +
|
| 129 | +You should claim whether this is based on the pre-trained weights, which are converted from the official release; or it's a reproduced result obtained from retraining the model in this project. --> |
| 130 | + |
| 131 | +## Checklist |
| 132 | + |
| 133 | +- [x] Milestone 1: PR-ready, and acceptable to be one of the `projects/`. |
| 134 | + |
| 135 | + - [x] Finish the code |
| 136 | + - [x] Basic docstrings & proper citation |
| 137 | + - [ ] Test-time correctness |
| 138 | + - [x] A full README |
| 139 | + |
| 140 | +- [ ] Milestone 2: Indicates a successful model implementation. |
| 141 | + |
| 142 | + - [ ] Training-time correctness |
| 143 | + |
| 144 | +- [ ] Milestone 3: Good to be a part of our core package! |
| 145 | + |
| 146 | + - [ ] Type hints and docstrings |
| 147 | + - [ ] Unit tests |
| 148 | + - [ ] Code polishing |
| 149 | + - [ ] Metafile.yml |
| 150 | + |
| 151 | +- [ ] Move your modules into the core package following the codebase's file hierarchy structure. |
| 152 | + |
| 153 | +- [ ] Refactor your modules into the core package following the codebase's file hierarchy structure. |
0 commit comments