You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the training of the VQGAN model on CT data, persistent "white dot" artifacts appear in the reconstruction results, even after extensive training. The white dots are present in both the training and validation sets, and although their frequency decreases over time, they are still clearly visible after 300K iterations. We have tried adjusting several training parameters, but the issue persists.
Request for Input
Could you take a look at this issue? We're wondering if this could be related to the data preprocessing pipeline, particularly the resampling step, or if there might be another factor we're overlooking.
classDEFAULTDataset(Dataset):
def__init__(self, root_dir, size=None, mode='train', **others):
print('size: ', size)
super().__init__()
self.size=sizeifothers["resize"] isFalse:
self.preprocessing=tio.Compose([
tio.RescaleIntensity(out_min_max=(-1, 1)),
tio.CropOrPad(target_shape=size)
])
else:
self.preprocessing=tio.Compose([
tio.Lambda(self.resample_to_target_shape),
tio.RescaleIntensity(out_min_max=(-1, 1)),
tio.CropOrPad(target_shape=size)
])
self.target_shape=sizeself.mode=modeifself.mode=="train":
self.transforms=TRAIN_TRANSFORMSelse:
self.transforms=Noneroot_dir=list(root_dir)
print('root_dir: ', root_dir)
print('root_dir type: ', type(root_dir))
self.file_paths=self.get_data_files(root_dir)
defresample_to_target_shape(self, image):
ifisinstance(image, tio.ScalarImage):
original_shape=image.spatial_shapeoriginal_voxel_size=image.spacingelse:
image=tio.ScalarImage(tensor=image)
original_shape=image.spatial_shapeoriginal_voxel_size= [1, 1, 1]
# Compute the new voxel size to give the desired target shapetarget_voxel_size= [
(orig_size*voxel_size) /target_sizefororig_size, voxel_size, target_sizeinzip(original_shape, original_voxel_size, self.target_shape)
]
# Create a Resample transform using the computed voxel sizeresample_transform=tio.Resample(target_voxel_size)
# Apply the resample transform to the image (if image is not Tensor)ifisinstance(image, tio.ScalarImage):
returnresample_transform(image).dataelse:
raiseTypeError("Something wrong about this image data, it should be ScalarImage datatype so it can be transformed using Resampling operations.")
We are using the same config described in the paper.
Any guidance or suggestions would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered:
Looks to me like a clipping error of the visualization code. You could check the min/max of the image and try to push it into a range that can be handled by the plotting function.
Problem Description
During the training of the VQGAN model on CT data, persistent "white dot" artifacts appear in the reconstruction results, even after extensive training. The white dots are present in both the training and validation sets, and although their frequency decreases over time, they are still clearly visible after 300K iterations. We have tried adjusting several training parameters, but the issue persists.
Request for Input
Could you take a look at this issue? We're wondering if this could be related to the data preprocessing pipeline, particularly the resampling step, or if there might be another factor we're overlooking.
We are using the same config described in the paper.
Any guidance or suggestions would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: