This directory contains few tools for MaskFormer.
* `convert-torchvision-to-d2.py`
Tool to convert torchvision pre-trained weights for D2.
```
wget https://download.pytorch.org/models/resnet101-63fe2227.pth
python tools/convert-torchvision-to-d2.py resnet101-63fe2227.pth R-101.pkl
```
* `convert-pretrained-swin-model-to-d2.py`
Tool to convert Swin Transformer pre-trained weights for D2.
```
pip install timm
wget https://github.com/SwinTransformer/storage/releases/download/v1.0.0/swin_tiny_patch4_window7_224.pth
python tools/convert-pretrained-swin-model-to-d2.py swin_tiny_patch4_window7_224.pth swin_tiny_patch4_window7_224.pkl
wget https://github.com/SwinTransformer/storage/releases/download/v1.0.0/swin_small_patch4_window7_224.pth
python tools/convert-pretrained-swin-model-to-d2.py swin_small_patch4_window7_224.pth swin_small_patch4_window7_224.pkl
wget https://github.com/SwinTransformer/storage/releases/download/v1.0.0/swin_base_patch4_window12_384_22k.pth
python tools/convert-pretrained-swin-model-to-d2.py swin_base_patch4_window12_384_22k.pth swin_base_patch4_window12_384_22k.pkl
wget https://github.com/SwinTransformer/storage/releases/download/v1.0.0/swin_large_patch4_window12_384_22k.pth
python tools/convert-pretrained-swin-model-to-d2.py swin_large_patch4_window12_384_22k.pth swin_large_patch4_window12_384_22k.pkl
```
* `evaluate_pq_for_semantic_segmentation.py`
Tool to evaluate PQ (PQ-stuff) for semantic segmentation predictions.
Usage:
```
python tools/evaluate_pq_for_semantic_segmentation.py --dataset-name ade20k_sem_seg_val --json-file OUTPUT_DIR/inference/sem_seg_predictions.json
```
where `OUTPUT_DIR` is set in the config file.
* `evaluate_coco_boundary_ap.py`
Tool to evaluate Boundary AP for instance segmentation predictions.
Usage:
```
python tools/coco_instance_evaluation.py --gt-json-file COCO_GT_JSON --dt-json-file COCO_DT_JSON
```
To install Boundary IoU API, run:
```
pip install git+https://github.com/bowenc0221/boundary-iou-api.git
```
* `analyze_model.py`
Tool to analyze model parameters and flops.
Usage for semantic segmentation (ADE20K only, use with caution!):
```
python tools/analyze_model.py --num-inputs 1 --tasks flop --use-fixed-input-size --config-file CONFIG_FILE
```
Note that, for semantic segmentation (ADE20K only), we use a dummy image with fixed size that equals to `cfg.INPUT.CROP.SIZE[0] x cfg.INPUT.CROP.SIZE[0]`.
Please do not use `--use-fixed-input-size` for calculating FLOPs on other datasets like Cityscapes!
Usage for panoptic and instance segmentation:
```
python tools/analyze_model.py --num-inputs 100 --tasks flop --config-file CONFIG_FILE
```
Note that, for panoptic and instance segmentation, we compute the average flops over 100 real validation images.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
基于Mask2Former进行医疗图像分割系统(含源码+项目说明文档).zip 这是一个使用Mask2Former进行医疗图像分割的项目。 主要包括以下内容: 主要功能点 在医疗图像数据集上使用Mask2Former模型进行训练和测试 提供了Mask2Former模型的配置文件和必要的Detectron2库文件修改 记录了模型训练和调试的具体步骤 包含了一个用于展示分割结果的网页应用程序 技术栈 Python 3.8 PyTorch 1.9.0, Torchvision 0.10.0 Detectron2 OpenCV 4.8.1 基于Mask2Former进行医疗图像分割系统(含源码+项目说明文档).zip 这是一个使用Mask2Former进行医疗图像分割的项目。 主要包括以下内容: 主要功能点 在医疗图像数据集上使用Mask2Former模型进行训练和测试 提供了Mask2Former模型的配置文件和必要的Detectron2库文件修改 记录了模型训练和调试的具体步骤 包含了一个用于展示分割结果的网页应用程序 技术栈 Python 3.8 PyTorch 1.9.0,
资源推荐
资源详情
资源评论
收起资源包目录
基于Mask2Former进行医疗图像分割系统(含源码+项目说明文档).zip (106个子文件)
ms_deform_attn_cpu.cpp 1KB
vision.cpp 942B
ms_deform_attn_cuda.cu 7KB
ms_deform_im2col_cuda.cuh 54KB
ms_deform_attn.h 2KB
ms_deform_attn_cuda.h 1KB
ms_deform_attn_cpu.h 1KB
launch.json 10KB
README.md 3KB
项目说明文档.md 2KB
README_EN.md 2KB
README_CN.md 2KB
README.md 164B
ADE20K下载.png 194KB
COCO数据集下载页面.png 47KB
image.png 24KB
resnet_galerkin.py 28KB
swin.py 27KB
galerkin_transformer.py 22KB
mask2former_transformer_decoder.py 18KB
maskformer_model.py 17KB
msdeformattn.py 16KB
fpn.py 12KB
transformer.py 12KB
galerkin_attention.py 11KB
criterion.py 10KB
train_net.py 10KB
evaluate_pq_for_semantic_segmentation.py 10KB
per_pixel_baseline.py 9KB
predictor.py 8KB
mask_former_semantic_dataset_mapper.py 8KB
matcher.py 7KB
maskformer_transformer_decoder.py 7KB
demo.py 7KB
ms_deform_attn.py 7KB
mask_former_head.py 6KB
analyze_model.py 6KB
instance_evaluation.py 5KB
config.py 4KB
test.py 4KB
register_Synapse_train_semantic_seg.py 4KB
SRNO_galerkin.py 4KB
Dice_HD_metrix.py 4KB
misc.py 4KB
test_time_augmentation.py 4KB
ms_deform_attn_func.py 4KB
bridge.py 3KB
register_Synapse_test_semantic_seg.py 3KB
prepare_synapse_test.py 3KB
prepare_synapse_test.py 3KB
setup.py 3KB
position_encoding.py 2KB
register_kvasir_seg_semantic.py 2KB
predict.py 2KB
register_DRIVE_semantic_seg.py 2KB
simple_attention.py 2KB
evaluate_coco_boundary_ap.py 1KB
download_ChestXRay.py 1KB
convert-torchvision-to-d2.py 1KB
Interface.py 1KB
prepare_Synapse_train.py 1KB
prepare_Synapse_train.py 1KB
__init__.py 944B
convert-pretrained-swin-model-to-d2.py 856B
__init__.py 734B
__init__.py 720B
synapse_value.py 457B
__init__.py 445B
__init__.py 353B
__init__.py 202B
__init__.py 166B
__init__.py 74B
__init__.py 51B
__init__.py 51B
__init__.py 51B
__init__.py 51B
__init__.py 26B
__init__.py 0B
ms_deform_attn.cpython-38.pyc 5KB
misc.cpython-38.pyc 4KB
ms_deform_attn_func.cpython-38.pyc 3KB
__init__.cpython-38.pyc 256B
__init__.cpython-38.pyc 241B
__init__.cpython-38.pyc 161B
make.sh 729B
labels.txt 266B
requirements.txt 69B
Base-Kvasir-SEG-SemanticSegmentation.yaml 2KB
Base-Synapse-SemanticSegmentation.yaml 2KB
Base-DRIVE-SemanticSegmentation.yaml 2KB
MaskFormer2_R50_galerkin.yaml 2KB
MaskFormer2_R50_galerkin.yaml 2KB
MaskFormer2_R50_galerkin.yaml 1KB
MaskFormer2_R50_bs16_160k.yaml 1KB
MaskFormer2_R50_bs16_160k.yaml 1KB
MaskFormer2_R50_bs16_160k.yaml 1KB
galerkin_transformer_base_model.yaml 555B
galerkin_transformer_base_model.yaml 553B
galerkin_transformer.yaml 552B
galerkin_transformer_base_model.yaml 550B
共 106 条
- 1
- 2
资源评论
onnx
- 粉丝: 9331
- 资源: 4891
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- java毕业设计-基于SSM框架的传统服饰文化体验平台【代码+部署教程】
- 优化领域的模拟退火算法详解与实战
- NewFileTime-x64.zip.fgpg
- 基于Python和HTML的Chinese-estate-helper房地产爬虫及可视化设计源码
- 基于SpringBoot2.7.7的当当书城Java后端设计源码
- 基于Python和Go语言的开发工具集成与验证设计源码
- 基于Python与JavaScript的国内供应商管理系统设计源码
- aspose.words-20.12-jdk17
- 基于czsc库的Python时间序列分析设计源码
- 基于Java、CSS、JavaScript、HTML的跨语言智联平台设计源码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功