Monai, Medical Imaging, Pytorch, Triton Inference Server, Torchserve.
self.target = 0 self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu") 2. Write the data preprocessing function def preprocess(self, data_fn): transforms = Compose([LoadImage(image_only=True), EnsureChannelFirst(), Resize(spatial_size=(256, 256,24)),