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

Cleanup of tensor to image conversions 🧹 #1348

Merged
merged 2 commits into from
May 13, 2022

Conversation

lindapaiste
Copy link
Contributor

There is a lot of repetitive and/or unnecessary code for returning generated images in multiple formats (raw, tensor, blob, etc.).

This PR creates a new utility function generatedImageResult for this task, and uses that utility in BodyPix, CartoonGAN, CVAE, DCGAN, and UNET. I am still returning the results in the same format as before.

Copy link
Contributor

@joeyklee joeyklee left a comment

Choose a reason for hiding this comment

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

LGTM! ✅ - Another really good example of clean up! Is it spring cleaning?! 🚀

@joeyklee joeyklee added ready for release SEMVER/patch a version tag for a patch release change labels May 11, 2022
# Conflicts:
#	src/BodyPix/index.js
#	src/CartoonGAN/index.js
#	src/DCGAN/index.js
#	src/UNET/index.js
@lindapaiste lindapaiste merged commit 2c5cd1e into ml5js:main May 13, 2022
@lindapaiste lindapaiste deleted the fix/image-conversion branch May 13, 2022 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for release SEMVER/patch a version tag for a patch release change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants