This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import os | |
from monai.metrics import DiceMetric, GeneralizedDiceScore | |
from monai.losses import GeneralizedDiceFocalLoss | |
import json | |
import sys | |
from monai.visualize import plot_2d_or_3d_image | |
import tempfile | |
from glob import glob | |
from torch.utils.tensorboard import SummaryWriter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import os | |
from monai.metrics import DiceMetric, GeneralizedDiceScore | |
from monai.losses import GeneralizedDiceFocalLoss | |
import json | |
import sys | |
from monai.visualize import plot_2d_or_3d_image | |
import tempfile | |
from glob import glob | |
from torch.utils.tensorboard import SummaryWriter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from monai.bundle.scripts import download | |
from monai.bundle.config_parser import ConfigParser | |
import os | |
class ModelDef(): | |
def __init__(self, model_name): | |
download(name=model_name) | |
download_dir = "/home/gupta/.cache/torch/hub/bundle/" + model_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import monai | |
import inspect | |
from monai.transforms import LoadImage, AddChannel, Compose | |
import json | |
from typing import Dict, List, Optional, Sequence, Union | |
from monai.transforms import Transform | |
from monai.data.image_reader import ImageReader, ITKReader, NibabelReader, NumpyReader, PILReader | |
import logging | |
import warnings | |
from monai.config import DtypeLike, PathLike |