-
Notifications
You must be signed in to change notification settings - Fork 267
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
Add TFLite + Transformer example #179
Conversation
I checked-out the project. One minor comment: should it be possible to repeat the export with another style? At the moment the selector is available but the export button is disabled because the export completed already.
|
float[] identityMatrix = GlUtil.create4x4IdentityMatrix(); | ||
glProgram.setFloatsUniform("uTexTransformationMatrix", identityMatrix); | ||
glProgram.setFloatsUniform("uTransformationMatrix", identityMatrix); | ||
// glProgram.setFloatsUniform("uRgbMatrix", identityMatrix); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code?
bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); | ||
bitmap.copyPixelsFromBuffer(pixelBuffer); | ||
|
||
Log.w("DEBUG", "Process frame at " + (presentationTimeUs / 1000) + " ms"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we follow the same convention as in other classes and define a TAG const and use it instead of "Debug"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that makes sense, will do
import javax.microedition.khronos.opengles.GL10; | ||
|
||
@UnstableApi | ||
final class StyleTransferShaderProgram extends BaseGlShaderProgram { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we aim to convert it to Kotlin? Do you aim to keep this repo Kotlin only or any guidelines on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we should convert this to Kotlin even though we don't have any strict guidelines on keeping this repo kotlin only.
so i do this in a separate PR to keep it easier to review or just do it as part of this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am ok with having a follow up PR with a Kotlin version as long as the repository owner is fine with it.
… Remove unused code, added TAG constant, and added TODO for migrating to Kotlin
addressed comments, please take another look!
|
trying to make builds pass again on this repo before merging this (#185) |
@SigmanZero can you give this an LGTM? It still needs an approval from someone with write access on this repo |
@ksemenova @lethargicpanda can you take a quick look at this PR as well? checking out |
merging this for now but @ksemenova @lethargicpanda let me know if there are concerns on the TFLite front and I can make follow up PRs to address |
Demonstrates applying an Effect generated by TFLite's Artistic Style Transfer on a video using Transformer API.
style_transfer.mp4