Giter Site home page Giter Site logo

deeparsdk / photoedit-android-java Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 3.0 18.89 MB

How to apply face filter on the photo loaded from gallery using DeepAR SDK

Home Page: https://developer.deepar.ai

License: MIT License

Java 100.00%
android augmented-reality deepar face-filters java

photoedit-android-java's People

Contributors

jelenakb avatar luka-m avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

photoedit-android-java's Issues

App crash on Start

2022-09-14 11:35:42.001 16382-16467/ai.deepar.photo_edit_example E/AndroidRuntime: FATAL EXCEPTION: ExampleHandlerThread
Process: ai.deepar.photo_edit_example, PID: 16382
java.lang.IllegalStateException: Method called from the thread that DeepAR was not initialized in. You must call this method from the same thread that you initialized DeepAR in (the same thread where you first call DeepAR.setRenderSurface()).
at ai.deepar.ar.DeepAR.checkValidState(DeepAR.java:659)
at ai.deepar.ar.DeepAR.receiveFrame(DeepAR.java:674)
at ai.deepar.photo_edit_example.LoadImageHandlerThread.uploadBitmapToDeepAR(LoadImageHandlerThread.java:148)
at ai.deepar.photo_edit_example.LoadImageHandlerThread.loadDefaultBitmap(LoadImageHandlerThread.java:90)
at ai.deepar.photo_edit_example.LoadImageHandlerThread$1.handleMessage(LoadImageHandlerThread.java:75)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:233)
at android.os.Looper.loop(Looper.java:334)
at android.os.HandlerThread.run(HandlerThread.java:67)

Having issue in running the sample project

System config
Android Studio 3.6.1
Build #AI-192.7142.36.36.6241897, built on February 27, 2020
Runtime version: 1.8.0_212-release-1586-b04 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

The project is not compiling
FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not find :deepar:.
Required by:
project :app

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 0s

as far as I think it is not able to get the deepar.aar library, how can I resolve this.

[Enhancement] Improve API Key Setup and README

In MainActivity.java, add the following:

private static final String API_KEY = "your-api-key-here";

private void initializeDeepAR() {
    deepAR = new DeepAR(this);
    deepAR.setLicenseKey(API_KEY);
    deepAR.initialize(this, this);

}

For README:

  • Add screenshots of API Key Generation/How-To

[Crash] ArrayIndexOutOfBoundsException: Clicking "<" after launch of app

The trace:
2020-03-07 19:35:06.155 29123-29123/ai.deepar.photo_edit_example E/AndroidRuntime: FATAL EXCEPTION: main Process: ai.deepar.photo_edit_example, PID: 29123 java.lang.ArrayIndexOutOfBoundsException: length=22; index=-1 at java.util.ArrayList.get(ArrayList.java:439) at ai.deepar.photo_edit_example.MainActivity.gotoPrevious(MainActivity.java:278) at ai.deepar.photo_edit_example.MainActivity.access$200(MainActivity.java:52) at ai.deepar.photo_edit_example.MainActivity$6.onClick(MainActivity.java:210)

It seems like a trivial fix but something I was quickly able to come across during exploratory testing!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.