Hi
I had similar problem and I solved it. Here is the link to the post. Although, I have used a subset of original transformation pipeline, still I wanted to have identical for that subset.

  
    
    
    Use a subset of Composed Transforms with same random seed vision
  
  
    The problem solved using feeding same seed value before applying each Compose of transforms. 


def __getitem__(self,index):      
        img = Image.open(self.data[index]).convert('RGB')
        target = Image.open(self.data_labels[index])
        
        seed = np.random.randint(2147483647) # make a seed with numpy generator 
        random.seed(seed) # apply this seed to img tranfsorms
        if self.transform is not None:
            img = self.transform(img)
            
        random.s…
  


bests,
Nik