TNet-Segmentation
- It is a pytorch based Segmentation model inspired by the research paper
T. M. Khan, A. Robles-Kelly and S. S. Naqvi, "T-Net: A Resource-Constrained Tiny Convolutional Neural Network for Medical Image Segmentation," 2022 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), Waikoloa, HI, USA, 2022, pp. 1799-1808, doi: 10.1109/WACV51458.2022.00186.published in CVPR 2022
How to install
- run
pip install TNet-Segmentationto install the package
How to use
Creating Model
- The model takes three parameters: -
- input_channnel (defaults to 3)
- emb_size (size of the output channel after first downsampling conv layer.Defaults to 512)
- num_classes (the num of segmentation classes, defaults to 3)
- Usage is as simple as below:-
>>> from TNet_Segmentation import TNet >>> net = TNet(input_channel=3, emb_size=256, num_classes=3)
Visualizing
- After creating the model call visualize function as follows:-
>>> from TNet_Segmentation import visualize >>> visualize(net) ================================================================= Layer (type:depth-idx) Param # ================================================================= TNet -- ├─Conv2d: 1-1 7,168 ├─TNetConvBlock: 1-2 -- │ └─ModuleList: 2-1 -- │ │ └─Conv2d: 3-1 590,080 │ │ └─BatchNorm2d: 3-2 512 │ │ └─ReLU: 3-3 -- │ │ └─Conv2d: 3-4 65,792 │ │ └─BatchNorm2d: 3-5 512 │ │ └─Conv2d: 3-6 2,560 │ │ └─BatchNorm2d: 3-7 512 │ │ └─ReLU: 3-8 -- │ │ └─MaxPool2d: 3-9 --
DiceLoss function
- Dice Loss is implemented in this library and can be used as follows:
>>> from TNet_Segmentation import DiceLoss >>> loss = DiceLoss()
Metadata
Release files for TNet-Segmentation 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tnet_segmentation-1.0.2.tar.gz | 3.5 kB | Without provenance | Details for tnet_segmentation-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tnet_segmentation-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for tnet_segmentation-1.0.2-py3-none-any.whl |
Total release size: 7.7 kB
Release files / tnet_segmentation-1.0.2.tar.gz
| Download URL | tnet_segmentation-1.0.2.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8dffa1407b599aa3db1138ebdbab452a944edf84317227440fe067c5bcbdd0e
|
|
BLAKE2b-256 checksum How to use checksums |
11cbdc407f4e6af6d95f9980e80d999ef7ae455c6c4cdac53034a47b6da6a029
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.8.18 Windows/10
|
Release files / tnet_segmentation-1.0.2-py3-none-any.whl
| Download URL | tnet_segmentation-1.0.2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99541d48bf92c15d67e098270c578a93fc178e82d2cb34a211d69607deb1fdf7
|
|
BLAKE2b-256 checksum How to use checksums |
6c57dcb24645a233b7db0130ad06def3e773f55e560ac1058306e5b83caced42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.8.18 Windows/10
|
Security for TNet-Segmentation 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.