Skip to content

Conversation

@debug-soham
Copy link
Contributor

Description:

This PR adds the ImageDataGenerator class in pydeepflow/preprocessing.py to enable real-time image data augmentation (rotation, shift, zoom, flip). This enhances the CNN capabilities by helping prevent overfitting and improving model robustness.

Key Changes:

  • New File: pydeepflow/preprocessing.py containing the ImageDataGenerator.
  • Modified: pydeepflow/model.py - Updated fit() methods in Multi_Layer_ANN and Multi_Layer_CNN to accept the generator. Fixed pooling layer __init__ for integer pool_size.
  • Modified: pydeepflow/__init__.py - Exported ImageDataGenerator.

Test

The new feature can be tested by creating an instance of the ImageDataGenerator and passing its flow method to the model's fit function. All existing tests continue to pass, ensuring no regressions were introduced.

Closes #117

Copy link
Owner

@ravin-d-27 ravin-d-27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing! Thank you!

@ravin-d-27 ravin-d-27 merged commit b57f015 into ravin-d-27:main Oct 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add ImageDataGenerator for Data Augmentation

2 participants