Reminder: We will be carrying out upgrades to AppGallery Connect from 16:00 UTC to 21:00 UTC on September 21, 2020. The development, distribution, operations, and analytics services may be temporarily unavailable during the process. We would like to apologize for any inconvenience this may cause you.
AestheticsScoreDetector aestheticsScoreDetector = new AestheticsScoreDetector(MainActivity.this);
Frame frame = new Frame();
JSONObject jsonObject = aestheticsScoreDetector.detect(frame,null);
AestheticsScore aestheticsScores = aestheticsScoreDetector.convertResult(jsonObject);
float score = aestheticsScores.getScore();
Yes. In detect() method engine startup is in default. The engine will not start up again if started, please use with confidence.
The release() method will uninstall a model that has been loaded to the NPU chip. If the app is no longer using face detection, uninstall the model in a timely manner to free up resources.