Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change image class to use PyTorch tensors and methods #506

Merged

Conversation

Marsmaennchen221
Copy link
Contributor

Closes #505

Summary of Changes

feat: Changed Image class to use PyTorch tensors
refactor: Image class now uses PyTorch transform methods

feat: Added test implementation of CNN Layers
…o_pytorch_tensor_and_cnn_layer

# Conflicts:
#	poetry.lock
#	pyproject.toml
#	tests/safeds/data/image/containers/test_image.py
#	tests/safeds/data/tabular/containers/_column/test_plot_boxplot.py
#	tests/safeds/data/tabular/containers/_column/test_plot_histogram.py
#	tests/safeds/data/tabular/containers/_table/test_plot_boxplots.py
#	tests/safeds/data/tabular/containers/_table/test_plot_correlation_heatmap.py
#	tests/safeds/data/tabular/containers/_table/test_plot_histograms.py
#	tests/safeds/data/tabular/containers/_table/test_plot_lineplot.py
#	tests/safeds/data/tabular/containers/_table/test_plot_scatterplot.py
… uses cpu

docs: Added docstrings to all Image methods
feat: Added IllegalFormatError
refactor: Removed ImagePil
…ethods' of https://github.com/Safe-DS/Stdlib into image_to_pytorch_tensor_and_cnn_layer

# Conflicts:
#	poetry.lock
refactor: Completely removed ImagePil
@Marsmaennchen221 Marsmaennchen221 linked an issue Dec 8, 2023 that may be closed by this pull request
Copy link
Contributor

github-actions bot commented Dec 8, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 10 0 0 0.97s
✅ PYTHON mypy 10 0 1.79s
✅ PYTHON ruff 10 0 0 0.14s
✅ REPOSITORY git_diff yes no 0.12s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@lars-reimann lars-reimann changed the title feat: change image class to use pytorch tensors pytorch methods feat: change image class to use PyTorch tensors and methods Dec 8, 2023
pyproject.toml Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (28ed5c9) 100.00% compared to head (d144ae3) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #506   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           49        49           
  Lines         2699      2681   -18     
=========================================
- Hits          2699      2681   -18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Marsmaennchen221 Marsmaennchen221 marked this pull request as ready for review January 1, 2024 22:06
@Marsmaennchen221 Marsmaennchen221 requested a review from a team as a code owner January 1, 2024 22:06
Copy link
Member

@lars-reimann lars-reimann left a comment

Choose a reason for hiding this comment

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

Looks really comprehensive. I only have a few remarks, mostly regarding the handling of devices.

src/safeds/data/image/containers/_image.py Show resolved Hide resolved
src/safeds/data/image/containers/_image.py Outdated Show resolved Hide resolved
src/safeds/data/image/containers/_image.py Show resolved Hide resolved
src/safeds/data/image/containers/_image.py Show resolved Hide resolved
src/safeds/data/image/containers/_image.py Show resolved Hide resolved
src/safeds/data/image/containers/_image.py Show resolved Hide resolved
src/safeds/data/image/containers/_image.py Outdated Show resolved Hide resolved
src/safeds/data/image/containers/_image.py Outdated Show resolved Hide resolved
Copy link
Member

@lars-reimann lars-reimann left a comment

Choose a reason for hiding this comment

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

Well done, thank you!

@lars-reimann lars-reimann merged commit efa2b61 into main Jan 10, 2024
7 checks passed
@lars-reimann lars-reimann deleted the 505-change-image-class-to-use-pytorch-tensors-pytorch-methods branch January 10, 2024 18:07
lars-reimann pushed a commit that referenced this pull request Jan 11, 2024
## [0.17.0](v0.16.0...v0.17.0) (2024-01-11)

### Features

* change image class to use PyTorch tensors and methods ([#506](#506)) ([efa2b61](efa2b61)), closes [#505](#505)
@lars-reimann
Copy link
Member

🎉 This PR is included in version 0.17.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Included in a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change Image Class to use PyTorch tensors & PyTorch methods
3 participants