done 7 transformations

This commit is contained in:
Nguyễn Phước Thành
2025-08-05 21:42:23 +07:00
parent 3fd270c8bd
commit 96a1de908f
6 changed files with 706 additions and 30 deletions

View File

@@ -70,10 +70,10 @@ def save_image(image: np.ndarray, output_path: Path, quality: int = 95) -> bool:
print(f"Error saving image {output_path}: {e}")
return False
def create_augmented_filename(original_path: Path, index: int, suffix: str = "aug") -> Path:
"""Create filename for augmented image"""
def create_augmented_filename(original_path: Path, index: int, method: str = "aug") -> Path:
"""Create filename for augmented image with method name"""
stem = original_path.stem
suffix = f"_{suffix}_{index:02d}"
suffix = f"_{method}_{index:02d}"
return original_path.parent / f"{stem}{suffix}{original_path.suffix}"