Skip to content

Commit

Permalink
Fix same and equal
Browse files Browse the repository at this point in the history
  • Loading branch information
henryruhs committed Mar 3, 2025
1 parent d16d493 commit 0004a85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions face_swapper/src/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ def prepare_different_batch(self, source_path : str) -> Batch:
target_tensor = self.transforms(target_tensor)
return source_tensor, target_tensor

def prepare_same_batch(self, source_path : str) -> Batch:
def prepare_equal_batch(self, source_path : str) -> Batch:
source_tensor = io.read_image(source_path)
source_tensor = self.transforms(source_tensor)
return source_tensor, source_tensor

def prepare_equal_batch(self, source_path : str) -> Batch:
def prepare_same_batch(self, source_path : str) -> Batch:
target_directory_path = os.path.dirname(source_path)
target_file_name_and_extension = random.choice(os.listdir(target_directory_path))
target_path = os.path.join(target_directory_path, target_file_name_and_extension)
Expand Down

0 comments on commit 0004a85

Please sign in to comment.