Skip to main content

One stop medical toolkit

Project description

EasyMed

EasyMed is a one-stop medical Python advanced package based on the PyTorch framework. It allows you to easily and conveniently create some commonly used models by simply editing parameters. In the initial version, you can create UNet models and variants suitable for image segmentation tasks.

Features

  • Fast UNet model creation
  • Customizable encoder blocks
  • Selectable bridge
  • Flexible and adjustable number of channels

Installation

You can install EasyMed using pip:

pip install easymed

Quick Start

from torch.utils import data
from easymed.CV.utils import ImageDataset
from easymed.CV.model.unet import UNet_2plus

# Here we use the default parameters
# in_channels=1 out_channels=1 mid_channels=[32, 64, 128, 256]
# encoder=double_conv  bridge =DilatedConv

net = UNet_2plus()

train_data = ImageDataset({your_path})

# Here we use the default parameters
# batch_size=4  shuffle=True
train_iter = data.DataLoader(train_data, batch_size=4, shuffle=True)

# Here we use the default parameters
#loss=nn.BCEWithLogitsLoss()  optimizer=torch.optim.SGD  epochs=40  lr=0.0001
net.train_net(train_iter=train_iter)

Parameter Description

Here are the parameters you can customize when creating a UNet model using MyPyTorchUNet:

  • in_channels: Input the number of input channels.

  • outchannels: Input the number of output channels.

  • mid_channels锛欼nput the number of feature channels of the hidden layers as a list.

  • encoder: Different kinds of blocks such as sigle_VGG,double_VGG,triple_VGG,sigle_Residual,double_Resudual, triple_Residual are provided to build the encoder.

  • bridge: DilatedConv,APSS,bridges from sota models in many well-known public datasets.

  • decoder: Different kinds of blocks such as sigle_VGG,double_VGG,triple_VGG,sigle_Residual,double_Resudual, triple_Residual are provided to build the decoder.

  • ...

Contributions

If you are interested in contributing to MyPyTorchUNet by adding code or suggesting improvements, please feel free to submit issues or pull requests.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easymed-0.0.6.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easymed-0.0.6-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file easymed-0.0.6.tar.gz.

File metadata

  • Download URL: easymed-0.0.6.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for easymed-0.0.6.tar.gz
Algorithm Hash digest
SHA256 de798626fa59ade8f933de8cf45f847f905759e51fa9cd41ea4a936e8c1fdf19
MD5 862be3ffd04937b8a664163da8f3a865
BLAKE2b-256 8303fb31884c7859d23b2cbd152f5e4967cee524ada9796f7bdf6ae4004397e5

See more details on using hashes here.

File details

Details for the file easymed-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: easymed-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for easymed-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 23a59b1a5fd224a2ec1687126bfea4acae781e78b8b5dfd741cdb65601b80751
MD5 2b7372815dbb575bfc68855f3d4e0963
BLAKE2b-256 d1984ebf1ebc2c81ae2eb46784d9fe12acd44689d3cfa22e68befffb2c12b36b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page