Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Medical Image Vision Operators, such as RoIAlign, DCNv1, DCNv2 and NMS for both 2/3D images.

License

NotificationsYou must be signed in to change notification settings

TimothyZero/MedVision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

描述 (Description)

为了方便3D医学图像相关的任务, 实现了主要的计算机视觉算子,例如RoIAlign, NMS 等,并且基于这些算子实现了多种数据增强的方法.

Computer vision operators in medical image, such as RoIAlign, DCNv1, DCNv2 and NMS for both 2/3D images. And based on these operators, a variety of data augmentation methods have been implemented.

支持的CUDA算子 (Supported CUDA Operators)

see medvision/csrc and medvision/ops

MethodsTorchCudaCpuFP16
RoI Align2/3D2/3Dyes
RoI Align Rotated2/3Dyes
BBox overlaps2/3D2/3Dyes
NMS2/3D2/3Dyes
soft-NMS2/3D2Dyes
DCN v12/3Dyes
DCN v22/3Dyes
Deformable RoI Pooling2Dyes

Torch :implemented with torch functions.

支持的CUDA数据增强 (Supported CUDA Augmentations)

see medvision/aug_cuda and medvision/aug_cuda_batch

or medvision/aug_cpu for numpy version

MethodsCudaFP16OpsCPU time/msGPU time/ms
RandomAffine2/3DyesRoI Align Rotated530220
RandomScale2/3DyesRoI Align Rotated510919
RandomShift2/3DyesRoI Align Rotated235519
RandomRotate2/3DyesRoI Align Rotated116420
RandomFlip2/3Dyes648
CropRandom Series2/3DyesRoI Align Rotated561
RandomElasticDeformation2/3DyesDCN12163614
Resize2/3DyesRoI Align Rotated636512
Pad2/3Dyes3352
Normalize +2/3Dyes
RandomBlur2/3DyesConv4503
RandomNoise2/3Dyes5819
Display2/3Dyes
Viewer2/3Dyes

All of these will support forward and backward (need test).

可视化 (Visualization)

MethodsCuda
RandomAffineRandomAffine2D
RandomAffine3D
RandomScaleRandomScale3D
RandomShiftRandomShift3D
RandomRotate
RandomFlipRandomFlip3D
CropRandom SeriesCropRandomWithAffine3D
RandomElasticDeformationraw
ResizeResize3D
PadPad3D
RandomBlurRandomBlur2D
RandomBlur3D
RandomNoiseRandomNoise3D

待完成 (TODO)

安装 (Installation)

# run and check you cuda and torch# make sure your torch.version.cuda == cuda_home_versionpython -m torch.utils.collect_env# if neededexport PATH="path_to/gcc-5.4+/bin/:$PATH"export CUDA_HOME="/path_to/cuda-9.0+"git clone https://github.com/TimothyZero/MedVisioncd MedVisionpython setup.py develop# recommended# orpip install -e.# -e : editable, sometimes may cause cpu 100%

测试环境 (Tested Environment)

cudatorchgcc
9.01.6.05.4
10.11.7.17.5
10.21.8.17.5
11.11.11.07.5
11.82.0.011.4✅ *

*: kaggle T4

提示 (Tips)

  1. AT_CHECK was not declared in this scope

For torch 1.5+,AT_CHECK is replaced withTORCH_CHECK, so if your torch version > 1.5 ,

#ifndef AT_CHECK#defineAT_CHECK TORCH_CHECK#endif

at the beginning of the .cu code.

  1. debug in CUDA
#include<stdio.h>printf("Hello from block %d, thread %d\n",a,b);
  1. .contiguous() is very import in roi align!

  2. CUDA Too many resources requested for launch

    "Too Many Resources Requested for Launch - This error means that the number of registers available on the multiprocessor is being exceeded. Reduce the number of threads per block to solve the problem."

许可证 (License)

This framework is published under the Apache License Version 2.0.

致谢 (Acknowledge)

https://github.com/XinyiYing/D3Dnet

https://github.com/open-mmlab/mmdetection

https://github.com/MIC-DKFZ/medicaldetectiontoolkit

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp