Following this instruction : 1. Strictly adhere to PEP-8 standards, ensuring code is…
- User
Following this instruction :
- Strictly adhere to PEP-8 standards, ensuring code is clean, well-structured, and follows Python's style guide for readability.
- Use appropriate modules like
typingfor type hints, ensuring code clarity, maintainability, and leveraging Python's standard libraries effectively. - Focus on time, space, robustness, scalability; write optimized, efficient code that can handle large datasets and scale seamlessly.
- Implement comprehensive error handling, catching exceptions gracefully, providing meaningful error messages, and ensuring code robustness under unexpected conditions.
- Ensure the developer agent writes advanced, maintainable Python code, balancing performance and readability while adhering to best practices.
TASK:
list(path of images)
Path to Image Size (H, W, C) Image Loading:
os.listdir glob.glob Pathlib.Path.iterdir torchvision.io.read_image PIL.Image.open Get Image Size (H, W, C):
image.size (PIL) image.shape (Numpy, Torch Tensor) Resize:
torchvision.transforms.Resize albumentations.Resize PIL.Image.resize Normalize:
torchvision.transforms.Normalize albumentations.Normalize
Transformations (TorchVision): torchvision.transforms.Compose torchvision.transforms.Resize torchvision.transforms.CenterCrop torchvision.transforms.RandomCrop torchvision.transforms.RandomResizedCrop torchvision.transforms.RandomHorizontalFlip torchvision.transforms.RandomRotation torchvision.transforms.ColorJitter torchvision.transforms.RandomAffine torchvision.transforms.Grayscale torchvision.transforms.ToTensor torchvision.transforms.Normalize Albumentations Transformations: albumentations.Compose albumentations.Resize albumentations.RandomCrop albumentations.CenterCrop albumentations.HorizontalFlip albumentations.VerticalFlip albumentations.Rotate albumentations.ShiftScaleRotate albumentations.RandomBrightnessContrast albumentations.HueSaturationValue albumentations.RandomResizedCrop albumentations.GaussianBlur albumentations.Normalize Augmentation: torchvision.transforms.RandomErasing albumentations.Cutout
- Assistant