-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated core modules, made some unit tests for them.
- Loading branch information
Showing
7 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from core.StyleTransferModel import StyleTransferModel | ||
from core.ImageProcessor import ImageProcessor | ||
|
||
if __name__ == "__main__": | ||
content_image_path = "" | ||
style_image_path = "" | ||
output_image_path = "" | ||
|
||
processor = ImageProcessor() | ||
model = StyleTransferModel() | ||
|
||
content_image = processor.preprocess_image(content_image_path) | ||
style_image = processor.preprocess_image(style_image_path) | ||
|
||
# Apply style (placeholder for now) | ||
# styled_image = model.apply_style(content_image, style_image) | ||
|
||
# Save the output (placeholder for now) | ||
# processor.save_image(styled_image, output_image_path) | ||
|
||
print("Pipeline tested successfully") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import os | ||
from core.ImageProcessor import ImageProcessor | ||
|
||
def test_preprocess_image(): | ||
processor = ImageProcessor() | ||
processed_image = processor.preprocess_image("") | ||
assert processed_image.size == (512, 512) | ||
|
||
def test_save_image(): | ||
processor = ImageProcessor() | ||
sample_image = processor.preprocess_image("") | ||
processor.save_image(sample_image, "") | ||
assert os.path.exists("") |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from core.StyleTransferModel import StyleTransferModel | ||
|
||
def test_model_initialization(): | ||
model = StyleTransferModel() | ||
assert model.model is not None |