Modify the load_image function in the dataloader to segment and crop the relevant portion of the image using the segmentation pipeline
load_image:
|
def _load_image(self, image_path): |
|
image = Image.open(image_path).convert('RGB') |
|
if self.transform is not None: |
|
image = self.transform(image) |
|
return image |
segmentation pipeline: https://github.com/suryajasper/SynthMining/blob/main/synthesis_pipeline/object_segmentation/object_segmentation.py
Modify the load_image function in the dataloader to segment and crop the relevant portion of the image using the segmentation pipeline
load_image:
SynthMining/synthesis_pipeline/condGAN/dataset.py
Lines 49 to 53 in 51f0f80
segmentation pipeline: https://github.com/suryajasper/SynthMining/blob/main/synthesis_pipeline/object_segmentation/object_segmentation.py