# One-Shot Learning With Attention-Guided Segmentation in Cryo-Electron Tomography
Bo Zhou, Haisu Yu, Xiangrui Zeng, Xiaoyan Yang, Jing Zhang, and Min Xu
Frontiers in Molecular Biosciences (AI in Biological and Biomedical Imaging), 2020
[[Paper](https://www.frontiersin.org/articles/10.3389/fmolb.2020.613347/full)]
This repository contains the PyTorch implementation of COS-Net.
### Citation
If you use this code for your research or project, please cite:
@article{zhou2020one,
title={One-Shot Learning With Attention-Guided Segmentation in Cryo-Electron Tomography},
author={Zhou, Bo and Yu, Haisu and Zeng, Xiangrui and Yang, Xiaoyan and Zhang, Jing and Xu, Min},
journal={Frontiers in Molecular Biosciences},
volume={7},
year={2020},
publisher={Frontiers Media SA}
}
### Environment and Dependencies
Requirements:
* Python 3.7
* Pytorch 0.4.1
* scipy
* scikit-image
* opencv-python
* denseCRF3D
Our code has been tested with Python 3.7, Pytorch 0.4.1, CUDA 10.0 on Ubuntu 18.04.
### Dataset Setup
../
Data/
├── subtomograms_snrINF # dataset with SNR = INF
│ ├── cnt.npy # 22x1 array -- contains the number of subtomograms for each classes (22 classes in total)
│ ├── data.npy # 22x1000x32x32x32 array -- contains 22 classes' subtomograms with size of 32x32x32. 1000 subtomogram storage place give, and is indexed by cnt.npy
│ ├── data_seg.npy # 22x1000x32x32x32 array -- contains 22 classes' subtomogram segmentation with size of 32x32x32, corresponding with data.npy
│ ├── testtom_vol_00.npy # 1xcountsx32x32x32 array -- contains 1st class's subtomograms with size of 32x32x32, counts means number of subtomogram in this class.
│ ├── testtom_seg_00.npy # 1xcountsx32x32x32 array -- contains 1st class's subtomogram segmentation with size of 32x32x32, counts means number of subtomogram in this class.
│ ├── testtom_vol_01.npy # please refer to above comments
│ ├── testtom_seg_01.npy
│ ├── testtom_vol_02.npy
│ ├── testtom_seg_02.npy
│ ├── testtom_vol_03.npy
│ ├── testtom_seg_03.npy
│ ├── testtom_vol_04.npy
│ ├── testtom_seg_04.npy
│ ├── testtom_vol_05.npy
│ ├── testtom_seg_05.npy
│ ├── testtom_vol_06.npy
│ ├── testtom_seg_06.npy
│ ├── testtom_vol_07.npy
│ ├── testtom_seg_07.npy
│ ├── testtom_vol_08.npy
│ ├── testtom_seg_08.npy
│ ├── testtom_vol_09.npy
│ ├── testtom_seg_09.npy
│ ├── testtom_vol_10.npy
│ ├── testtom_seg_10.npy
│ ├── testtom_vol_11.npy
│ ├── testtom_seg_11.npy
│ ├── testtom_vol_12.npy
│ ├── testtom_seg_12.npy
│ ├── testtom_vol_13.npy
│ ├── testtom_seg_13.npy
│ ├── testtom_vol_14.npy
│ ├── testtom_seg_14.npy
│ ├── testtom_vol_15.npy
│ ├── testtom_seg_15.npy
│ ├── testtom_vol_16.npy
│ ├── testtom_seg_16.npy
│ ├── testtom_vol_17.npy
│ ├── testtom_seg_17.npy
│ ├── testtom_vol_18.npy
│ ├── testtom_seg_18.npy
│ ├── testtom_vol_19.npy
│ ├── testtom_seg_19.npy
│ ├── testtom_vol_20.npy
│ ├── testtom_seg_20.npy
│ ├── testtom_vol_21.npy
│ └── testtom_seg_21.npy
│
├── subtomograms_snr10000 # dataset with SNR = 10000
│ ├── cnt.npy
│ └── ...
└──
Please refer to the above data directory setup to prepare you data, and please carefully ead the comments for the file contents. \
The one-shot training and testing process use cnt.py / data.npy / data_seg.npy files. Our dataloader will split the first 1-14 classes as training class and 15-22 classes as testing class. \
The segmentation testing process use testtom_vol_nn.npy files.
### To Run Our Code
- Train and Test the one-shot model
```bash
python main_oneshot.py --dataset 'snrINF' --data_root '../Data/subtomograms_snrINF/' --net 'dusescnn' --N 2 --K 1
```
where \
`--dataset` is the dataset's name. \
`--data_root` provides the data folder directory (with structure illustrated above). \
`--net` is the network block structrue. \
`--N` is the number of way/class. \
`--K` is the number of shot/sample per class. \
Other hyperparameters can be adjusted in the code as well.
- Test the model's segmentation output
```bash
python main_segment.py --dataset 'snrINF' --data_root '../Data/subtomograms_snrINF/' --resume './outputs/2-way-1-shot_dusescnn_snrINF/model_25.pkl' --net 'dusescnn' --N 2 --K 1
```
where \
`--resume` defines which checkpoint for segmentation test evaluation. \
The segmentation visualizations will be saved under './outputs/2-way-1-shot_dusescnn_snrINF/segment/'. \
The quantitative results per class will be saved in './outputs/2-way-1-shot_dusescnn_snrINF/segment/dice.txt'. \
Sample training/test scripts are provided under './scripts/' and can be directly executed.
### Contact
If you have any question, please file an issue or contact the author:
```
Bo Zhou: [email protected]
```
没有合适的资源?快使用搜索试试~ 我知道了~
用于细胞电子冷冻断层扫描分析的人工智能_AI_python_代码_下载
共636个文件
py:485个
md:62个
hpp:18个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 103 浏览量
2022-07-02
21:46:11
上传
评论 1
收藏 800KB ZIP 举报
温馨提示
AITom 是一个用于人工智能驱动的细胞电子冷冻断层扫描分析的开源平台。 背景 几乎一个细胞中的每一个主要过程都是由大分子组装的相互作用精心安排的,这些组装通常协调它们作为生化途径中的功能模块的作用。为了有效地进行,不同大分子机器之间的这种相互作用通常需要细胞中明显的非随机空间组织。随着最近细胞冷冻电子断层扫描 (Cryo-ET) 成像技术的革命,现在可以在亚分子分辨率下生成接近天然状态的水合细胞的 3D 重建。 研究 我们正在开发用于处理大量 Cryo-ET 数据的计算分析技术,以重建、检测、分类、恢复和对不同的细胞成分进行空间建模。我们利用最先进的机器学习(包括深度学习)方法来设计 Cryo-ET 特定的数据分析和建模算法。我们的研究使细胞结构发现自动化,并将导致对基础分子生物学和医学应用的新见解。 更多详情、使用方法,请下载后阅读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
用于细胞电子冷冻断层扫描分析的人工智能_AI_python_代码_下载
(636个子文件)
align.cpp 14KB
io.cpp 10KB
dilate.cpp 8KB
wrap_core.cpp 8KB
interpolation.cpp 7KB
watershed_segmentation.cpp 7KB
sht.cpp 7KB
fft_fftw.cpp 6KB
geometry.cpp 5KB
rotate.cpp 3KB
wigner.cpp 3KB
legendre.cpp 2KB
affine_transform.cpp 1KB
arma_extend.cpp 814B
fft.cpp 74B
styles_v3.css 5KB
Dockerfile 350B
ajax-loader.gif 11KB
.gitignore 157B
.gitignore 89B
.gitignore 89B
.gitignore 89B
.gitignore 42B
.gitignore 13B
.gitignore 0B
BinaryHeap.h 4KB
align.hpp 11KB
ac_div_AOS_3D_dll.hpp 8KB
interpolation.hpp 7KB
geometry.hpp 6KB
fft.hpp 6KB
affine_transform.hpp 6KB
arma_extend.hpp 4KB
legendre.hpp 4KB
sht.hpp 3KB
ac_distance_transform_3d.hpp 3KB
dilate.hpp 3KB
rotate.hpp 3KB
wrap_core.hpp 2KB
zy_binary_boundary_detection.hpp 1KB
wigner.hpp 1KB
fatal_error.hpp 870B
io.hpp 527B
watershed_segmentation.hpp 522B
particle-picking.html 19KB
MRC-render.html 17KB
index.html 12KB
file_input.html 5KB
display.html 4KB
inst1.html 2KB
inst1.html 2KB
inst4.html 2KB
inst2.html 2KB
inst3.html 1KB
inst2.html 1KB
inst4.html 1KB
inst5.html 1KB
inst3.html 1KB
input.html 1KB
disp-img.html 470B
upload.html 466B
list.html 443B
MANIFEST.in 17B
022_particle_picking_and_autoencoder.ipynb 6KB
Install_for_Google_Colab.ipynb 3KB
3D_Annotation.ipynb 2KB
dat.gui.min.js 54KB
TrackballControls.js 14KB
Volume.js 13KB
MRCLoader.js 10KB
VolumeSlice.js 6KB
LICENSE 34KB
LICENSE 1KB
LICENSE 1KB
publications.md 8KB
Remote_AITom_VSCode_Tutorial.md 6KB
README.md 5KB
readme.md 5KB
023_Denoising_tutorial.md 5KB
007_template_matching_tutorial.md 4KB
readme.md 4KB
README.md 3KB
README.md 3KB
readme.md 3KB
readme.md 3KB
readme.md 3KB
README.md 3KB
README.md 3KB
readme.md 3KB
README.md 3KB
README.md 3KB
ucsf_chimera.md 2KB
README.md 2KB
016_scipion.md 1KB
cryo_electron_tomography.md 1KB
README.md 1KB
README.md 1KB
README.md 1KB
Readme.md 1KB
README.md 1KB
共 636 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功