Capability Introduction

Aesthetic evaluation, comprehensive scoring

Implementing an advanced multi-dimensional scoring framework, the aesthetic engine comprehends complex subjective aspects in images, and makes high-level judgments related to the attractiveness, memorability and engaging nature of an image. This API can be used in photography or photo management apps, such as those for personal photo album management, automatic photo editing, and auxiliary photo shooting. The aesthetic engine's algorithms help realize the multi-dimensional evaluation of images, from aesthetic, technology, and compositional perspectives.

Scenarios

Photo album management, photography tool

This API provides for comprehensive aesthetic scoring, based on multiple variables, and can be applied in various photography scenarios.

Photo album management

Sorts images of the same object in the album according to score, enabling users to find high-quality images free of hassle.

Automatic photo editing

Images are edited and beautified based on a comprehensive image score, that takes focus, jitter, skew, color, and image composition, as well as other factors into consideration.

Description

Request
Copy

AestheticsScoreDetector aestheticsScoreDetector = new AestheticsScoreDetector(MainActivity.this);
Frame frame = new Frame();
frame.setBitmap(bitmap);
JSONObject jsonObject = aestheticsScoreDetector.detect(frame,null);
AestheticsScore aestheticsScores = aestheticsScoreDetector.convertResult(jsonObject);
float score = aestheticsScores.getScore();

Response
Copy

{
"resultCode":0,
"aestheticsScore":"{\"score\":91.11328125}",
"aestheticsScoreList":"{\"HFSCore\":[0.0],
\"OSPScores\":[0.9111328,0.07788086,0.18347168,0.017211914,0.33032227,-0.4152832,0.1586914,-0.7949219,0.15930176,0.8881836,-0.048034668,-0.06555176],
\"score\":91.11328}"
}

Start development here with Huawei

Service introduction

Service overview, application scenarios, and functions
Learn more

Access preparation

Preparation for access, such as registration, authentication, and agreement signing
Learn more

Sample code

Demonstration of sample code
Learn more

API description

Interface parameter definition, description, restrictions, and constraints
Learn more
FAQ
1Can prepare() method directly use detect() method without calling the API?

Yes. In detect() method engine startup is in default. The engine will not start up again if started, please use with confidence.

2When should I call the release() method?

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.