feat: ai score refactor
This commit is contained in:
1 parent
07cd25c7c3
commit
2a1b8b6635
9 files changed
+693
-374
No files matched your search
@@ -247,40 +247,73 @@ Return JSON only, without markdown, using this exact schema:
|
||||
try {
|
||||
val base64Image = bitmapToBase64(bitmap)
|
||||
val prompt = """
|
||||
你是挑剔且专业的顶级摄影评论家。请采用 PPA 12 Elements of a Merit Image 作为底层评审体系,对照片进行犀利且具有建设性的评分。拒绝任何客套、虚伪的赞美或泛泛而谈。
|
||||
You are an exacting international photography juror reviewing one single image.
|
||||
Use an editorial, contemporary-photography framework inspired by the recurring
|
||||
principles in LensCulture juror guidance: impact, originality, visual language,
|
||||
narrative autonomy, conceptual coherence, aesthetic quality, and technical mastery.
|
||||
This is not an official LensCulture score and you must not claim that it is.
|
||||
|
||||
请默认这是一张 60 分的平庸照片,你需要寻找理由为其加分或大幅扣分。
|
||||
Judge what is visible in the image. Do not invent the photographer's biography,
|
||||
caption, location, intent, or a larger series. Do not penalize unconventional focus,
|
||||
exposure, color, grain, motion, or framing when the choice clearly strengthens the
|
||||
work. Be candid, specific, and constructive; avoid generic praise.
|
||||
|
||||
请分别为 PPA 12 项评分,每项 0-100 分,各项评分各自独立无相关性,无需输出总分。
|
||||
- Impact: 照片给人的第一印象。一张好照片在被看到的瞬间,就应该能唤起观众的情感共鸣(震撼、感动、好奇、甚至是不安)。
|
||||
- Technical Excellence: 摄影的基础。包括曝光是否准确、焦点是否清晰(且在正确的位置)、白平衡、色彩管理以及后期的质量。
|
||||
- Creativity: 摄影师是否用新鲜、独特的视角来展现普通的事物。
|
||||
- Style: 作品是否体现了特定流派的特征,或者摄影师本人的强烈个人印记。
|
||||
- Composition: 画面元素的排列是否将观众的视线引向主体,并保持视觉平衡。
|
||||
- Presentation: 包括照片的裁切、边框、输出材质(如果是实体展出)是否与影像风格统一。
|
||||
- Color Balance: 画面中的色彩是否协调。不仅指白平衡准确,还包括色彩的情感表达和色彩对比(冷暖、互补等)。
|
||||
- Center of Interest: 画面必须有一个明确的聚焦点,不能让观众的视线在画面中漫无目的地游荡。
|
||||
- Lighting: 光线的使用不仅是为了照亮主体,更要塑造形态、质感、维度和氛围。
|
||||
- Subject Matter: 拍摄对象本身是否具有吸引力,或者是否与整体表达相契合。
|
||||
- Technique: 摄影师在前期拍摄和后期处理中使用的手法,是否巧妙地服务于最终的视觉效果。
|
||||
- Storytelling: 影像的最高境界。照片能否在没有文字说明的情况下,激发观众的想象力并传达一个完整的信息或情绪。
|
||||
Start from 60 for competent but unremarkable work, then move only when visible
|
||||
evidence earns it. Calibrate strictly:
|
||||
- 0-49: unresolved
|
||||
- 50-64: developing
|
||||
- 65-73: promising
|
||||
- 74-81: strong
|
||||
- 82-89: distinctive
|
||||
- 90-95: award-ready
|
||||
- 96-100: truly exceptional and extremely rare
|
||||
|
||||
The user's current system language is "$localeTag". The "summary" value MUST be written in that language.
|
||||
Score these five independent criteria from 0 to 100:
|
||||
1. Visual Impact (25%): stopping power, memorability, emotional immediacy, and
|
||||
whether the image rewards sustained attention.
|
||||
2. Originality & Authorial Voice (20%): a fresh subjective point of view and a
|
||||
distinctive visual language, not novelty for its own sake.
|
||||
3. Narrative & Meaning (20%): the image's ability to evoke a story, idea, tension,
|
||||
or feeling and to stand autonomously without a caption.
|
||||
4. Intent & Coherence (20%): whether subject, moment, framing, light, color, and
|
||||
editing work together toward a legible purpose within this single frame.
|
||||
5. Aesthetic & Technical Execution (15%): composition, light, tone/color,
|
||||
focus/motion, timing, and post-processing, judged by how well craft serves intent.
|
||||
|
||||
For every criterion, give one short sentence citing concrete visual evidence.
|
||||
Also provide:
|
||||
- "verdict": a concise two-sentence juror assessment balancing achievement and limitation.
|
||||
- "strength": the single most successful visible choice.
|
||||
- "improvement": the highest-leverage, actionable change for shooting, selection,
|
||||
framing, timing, light, or editing. Do not prescribe a generic rule.
|
||||
|
||||
The user's current system language is "$localeTag". Every feedback string,
|
||||
"verdict", "strength", and "improvement" MUST be written in that language.
|
||||
Return JSON only, without markdown formatting, code blocks, or any conversational text, using this exact schema:
|
||||
{
|
||||
"impactScore": 0-100 integer,
|
||||
"technicalExcellenceScore": 0-100 integer,
|
||||
"creativityScore": 0-100 integer,
|
||||
"styleScore": 0-100 integer,
|
||||
"compositionScore": 0-100 integer,
|
||||
"presentationScore": 0-100 integer,
|
||||
"colorBalanceScore": 0-100 integer,
|
||||
"centerOfInterestScore": 0-100 integer,
|
||||
"lightingScore": 0-100 integer,
|
||||
"subjectMatterScore": 0-100 integer,
|
||||
"techniqueScore": 0-100 integer,
|
||||
"storytellingScore": 0-100 integer,
|
||||
"summary": "对照片做一句话总结性评论,有内容有具体指导意见,使用用户系统语言"
|
||||
"visualImpact": {
|
||||
"score": 0-100 integer,
|
||||
"feedback": "specific evidence"
|
||||
},
|
||||
"originalityAndVoice": {
|
||||
"score": 0-100 integer,
|
||||
"feedback": "specific evidence"
|
||||
},
|
||||
"narrativeAndMeaning": {
|
||||
"score": 0-100 integer,
|
||||
"feedback": "specific evidence"
|
||||
},
|
||||
"intentAndCoherence": {
|
||||
"score": 0-100 integer,
|
||||
"feedback": "specific evidence"
|
||||
},
|
||||
"aestheticAndTechnicalExecution": {
|
||||
"score": 0-100 integer,
|
||||
"feedback": "specific evidence"
|
||||
},
|
||||
"verdict": "concise two-sentence juror assessment",
|
||||
"strength": "single strongest visible choice",
|
||||
"improvement": "single highest-leverage actionable change"
|
||||
}
|
||||
""".trimIndent()
|
||||
|
||||
@@ -364,27 +397,39 @@ Return JSON only, without markdown formatting, code blocks, or any conversationa
|
||||
cleaned
|
||||
}
|
||||
val json = JSONObject(jsonText)
|
||||
val scores = AiPhotoElementScores(
|
||||
impact = json.optInt("impactScore").coerceIn(0, 100),
|
||||
technicalExcellence = json.optInt("technicalExcellenceScore").coerceIn(0, 100),
|
||||
creativity = json.optInt("creativityScore").coerceIn(0, 100),
|
||||
style = json.optInt("styleScore").coerceIn(0, 100),
|
||||
composition = json.optInt("compositionScore").coerceIn(0, 100),
|
||||
presentation = json.optInt("presentationScore").coerceIn(0, 100),
|
||||
colorBalance = json.optInt("colorBalanceScore").coerceIn(0, 100),
|
||||
centerOfInterest = json.optInt("centerOfInterestScore").coerceIn(0, 100),
|
||||
lighting = json.optInt("lightingScore").coerceIn(0, 100),
|
||||
subjectMatter = json.optInt("subjectMatterScore").coerceIn(0, 100),
|
||||
technique = json.optInt("techniqueScore").coerceIn(0, 100),
|
||||
storytelling = json.optInt("storytellingScore").coerceIn(0, 100)
|
||||
val scores = AiPhotoCriteriaScores(
|
||||
visualImpact = json.requirePhotoCriterion("visualImpact"),
|
||||
originalityAndVoice = json.requirePhotoCriterion("originalityAndVoice"),
|
||||
narrativeAndMeaning = json.requirePhotoCriterion("narrativeAndMeaning"),
|
||||
intentAndCoherence = json.requirePhotoCriterion("intentAndCoherence"),
|
||||
aestheticAndTechnicalExecution =
|
||||
json.requirePhotoCriterion("aestheticAndTechnicalExecution")
|
||||
)
|
||||
return AiPhotoEvaluation(
|
||||
overallScore = scores.weightedOverallScore(),
|
||||
scores = scores,
|
||||
summary = json.optString("summary").trim()
|
||||
verdict = json.requireEvaluationText("verdict"),
|
||||
strength = json.requireEvaluationText("strength"),
|
||||
improvement = json.requireEvaluationText("improvement")
|
||||
)
|
||||
}
|
||||
|
||||
private fun JSONObject.requirePhotoCriterion(name: String): AiPhotoCriterion {
|
||||
val criterion = getJSONObject(name)
|
||||
val score = criterion.getInt("score")
|
||||
require(score in 0..100) {
|
||||
"AI response field \"$name.score\" was outside 0..100"
|
||||
}
|
||||
return AiPhotoCriterion(
|
||||
score = score,
|
||||
feedback = criterion.requireEvaluationText("feedback")
|
||||
)
|
||||
}
|
||||
|
||||
private fun JSONObject.requireEvaluationText(name: String): String =
|
||||
getString(name).trim().takeIf { it.isNotBlank() }
|
||||
?: throw IllegalArgumentException("AI response field \"$name\" was blank")
|
||||
|
||||
private fun parseLutRecipe(text: String): LutRecipe {
|
||||
val json = JSONObject(extractJsonObjectText(text))
|
||||
val controlPointsJson = json.optJSONArray("controlPoints")
|
||||
@@ -500,39 +545,33 @@ Return JSON only, without markdown formatting, code blocks, or any conversationa
|
||||
@Keep
|
||||
data class AiPhotoEvaluation(
|
||||
val overallScore: Int,
|
||||
val scores: AiPhotoElementScores,
|
||||
val summary: String
|
||||
val scores: AiPhotoCriteriaScores,
|
||||
val verdict: String,
|
||||
val strength: String,
|
||||
val improvement: String
|
||||
)
|
||||
|
||||
@Keep
|
||||
data class AiPhotoElementScores(
|
||||
val impact: Int,
|
||||
val technicalExcellence: Int,
|
||||
val creativity: Int,
|
||||
val style: Int,
|
||||
val composition: Int,
|
||||
val presentation: Int,
|
||||
val colorBalance: Int,
|
||||
val centerOfInterest: Int,
|
||||
val lighting: Int,
|
||||
val subjectMatter: Int,
|
||||
val technique: Int,
|
||||
val storytelling: Int
|
||||
data class AiPhotoCriterion(
|
||||
val score: Int,
|
||||
val feedback: String
|
||||
)
|
||||
|
||||
@Keep
|
||||
data class AiPhotoCriteriaScores(
|
||||
val visualImpact: AiPhotoCriterion,
|
||||
val originalityAndVoice: AiPhotoCriterion,
|
||||
val narrativeAndMeaning: AiPhotoCriterion,
|
||||
val intentAndCoherence: AiPhotoCriterion,
|
||||
val aestheticAndTechnicalExecution: AiPhotoCriterion
|
||||
) {
|
||||
fun weightedOverallScore(): Int {
|
||||
val weightedSum =
|
||||
impact * 5 +
|
||||
technicalExcellence * 6 +
|
||||
creativity * 7 +
|
||||
style * 7 +
|
||||
composition * 8 +
|
||||
presentation * 8 +
|
||||
colorBalance * 8 +
|
||||
centerOfInterest * 9 +
|
||||
lighting * 9 +
|
||||
subjectMatter * 10 +
|
||||
technique * 11 +
|
||||
storytelling * 12
|
||||
visualImpact.score * 25 +
|
||||
originalityAndVoice.score * 20 +
|
||||
narrativeAndMeaning.score * 20 +
|
||||
intentAndCoherence.score * 20 +
|
||||
aestheticAndTechnicalExecution.score * 15
|
||||
return (weightedSum / 100f).roundToInt().coerceIn(0, 100)
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import androidx.activity.compose.rememberLauncherForActivityResult
|
||||
import androidx.activity.result.IntentSenderRequest
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.compose.animation.core.*
|
||||
import androidx.compose.foundation.BorderStroke
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.horizontalScroll
|
||||
@@ -64,6 +65,7 @@ import androidx.media3.ui.AspectRatioFrameLayout
|
||||
import coil.request.ImageRequest
|
||||
import coil.compose.AsyncImage
|
||||
import com.hinnka.mycamera.hdr.HdrGainmapStrength
|
||||
import com.hinnka.mycamera.lut.creator.AiPhotoCriterion
|
||||
import com.hinnka.mycamera.lut.creator.AiPhotoEvaluation
|
||||
import com.hinnka.mycamera.lut.isVideoTransformerExportSupported
|
||||
import com.hinnka.mycamera.lut.VideoLutEffect
|
||||
@@ -1032,9 +1034,10 @@ private fun AiScoreBottomSheet(
|
||||
var uiState by remember(photo.id) { mutableStateOf<AiEvaluationUiState>(AiEvaluationUiState.Loading) }
|
||||
|
||||
val openAIKey by viewModel.openAIApiKey.collectAsState()
|
||||
val canEvaluate = isPurchased || !openAIKey.isNullOrBlank()
|
||||
|
||||
LaunchedEffect(photo.id, requestToken, isPurchased) {
|
||||
if (!isPurchased) return@LaunchedEffect
|
||||
LaunchedEffect(photo.id, requestToken, canEvaluate) {
|
||||
if (!canEvaluate) return@LaunchedEffect
|
||||
uiState = AiEvaluationUiState.Loading
|
||||
uiState = viewModel.evaluatePhotoWithAi(photo).fold(
|
||||
onSuccess = { AiEvaluationUiState.Success(it) },
|
||||
@@ -1042,42 +1045,57 @@ private fun AiScoreBottomSheet(
|
||||
)
|
||||
}
|
||||
|
||||
val evaluation = (uiState as? AiEvaluationUiState.Success)?.evaluation
|
||||
val score = evaluation?.overallScore ?: 0
|
||||
val (color, rankText) = when {
|
||||
score >= 90 -> Color(0xFFFFD700) to stringResource(R.string.gallery_ai_rank_excellent_plus)
|
||||
score >= 80 -> Color(0xFF4CAF50) to stringResource(R.string.gallery_ai_rank_excellent)
|
||||
score >= 70 -> Color(0xFF8BC34A) to stringResource(R.string.gallery_ai_rank_good)
|
||||
score >= 60 -> Color.White.copy(alpha = 0.8f) to stringResource(R.string.gallery_ai_rank_pass)
|
||||
else -> Color(0xFFFF5252) to stringResource(R.string.gallery_ai_rank_needs_work)
|
||||
}
|
||||
|
||||
ModalBottomSheet(
|
||||
onDismissRequest = onDismissRequest,
|
||||
sheetState = sheetState,
|
||||
containerColor = Color(0x881E1E1E),
|
||||
dragHandle = { BottomSheetDefaults.DragHandle(color = Color.White.copy(alpha = 0.4f)) }
|
||||
containerColor = AiEditorialBackground,
|
||||
dragHandle = {
|
||||
BottomSheetDefaults.DragHandle(color = AiEditorialOnSurface.copy(alpha = 0.28f))
|
||||
}
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.verticalScroll(rememberScrollState())
|
||||
.padding(bottom = 32.dp, start = 24.dp, end = 24.dp),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
.padding(bottom = 36.dp, start = 20.dp, end = 20.dp)
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(R.string.gallery_ai_quality_title),
|
||||
color = Color.White,
|
||||
fontSize = 18.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
modifier = Modifier.padding(bottom = 24.dp)
|
||||
)
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(bottom = 24.dp),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
Text(
|
||||
text = stringResource(R.string.gallery_ai_quality_title),
|
||||
color = AiEditorialOnSurface,
|
||||
fontSize = 22.sp,
|
||||
fontWeight = FontWeight.SemiBold
|
||||
)
|
||||
Spacer(modifier = Modifier.height(5.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.gallery_ai_editorial_framework),
|
||||
color = AiEditorialAccent,
|
||||
fontSize = 11.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
letterSpacing = 1.2.sp
|
||||
)
|
||||
}
|
||||
IconButton(onClick = onDismissRequest) {
|
||||
Icon(
|
||||
imageVector = Icons.Default.Close,
|
||||
contentDescription = stringResource(R.string.cancel),
|
||||
tint = AiEditorialOnSurface.copy(alpha = 0.62f)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (!isPurchased && openAIKey.isNullOrBlank()) {
|
||||
if (!canEvaluate) {
|
||||
Text(
|
||||
text = stringResource(R.string.gallery_ai_premium_required),
|
||||
color = Color.White.copy(alpha = 0.72f),
|
||||
fontSize = 14.sp,
|
||||
color = AiEditorialOnSurface.copy(alpha = 0.68f),
|
||||
fontSize = 15.sp,
|
||||
lineHeight = 22.sp,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
Spacer(modifier = Modifier.height(24.dp))
|
||||
@@ -1097,117 +1115,17 @@ private fun AiScoreBottomSheet(
|
||||
return@Column
|
||||
}
|
||||
|
||||
Box(
|
||||
contentAlignment = Alignment.Center,
|
||||
modifier = Modifier.size(160.dp)
|
||||
) {
|
||||
CircularProgressIndicator(
|
||||
progress = { 1f },
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
color = Color.White.copy(alpha = 0.1f),
|
||||
strokeWidth = 12.dp,
|
||||
strokeCap = androidx.compose.ui.graphics.StrokeCap.Round
|
||||
)
|
||||
|
||||
val animatedProgress by animateFloatAsState(
|
||||
targetValue = score / 100f,
|
||||
animationSpec = tween(1500, easing = FastOutSlowInEasing),
|
||||
label = "progress"
|
||||
)
|
||||
val animatedScore by animateIntAsState(
|
||||
targetValue = score,
|
||||
animationSpec = tween(1500, easing = FastOutSlowInEasing),
|
||||
label = "score"
|
||||
)
|
||||
|
||||
CircularProgressIndicator(
|
||||
progress = { animatedProgress },
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
color = color,
|
||||
strokeWidth = 12.dp,
|
||||
strokeCap = androidx.compose.ui.graphics.StrokeCap.Round
|
||||
)
|
||||
|
||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Text(
|
||||
text = animatedScore.toString(),
|
||||
color = color,
|
||||
fontSize = 48.sp,
|
||||
fontWeight = FontWeight.Bold
|
||||
)
|
||||
Text(
|
||||
text = rankText,
|
||||
color = color.copy(alpha = 0.8f),
|
||||
fontSize = 14.sp
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
|
||||
when (val state = uiState) {
|
||||
AiEvaluationUiState.Loading -> {
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
CircularProgressIndicator(
|
||||
color = AccentOrange,
|
||||
modifier = Modifier.size(28.dp),
|
||||
strokeWidth = 3.dp
|
||||
)
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.gallery_ai_analyzing),
|
||||
color = Color.White.copy(alpha = 0.7f),
|
||||
fontSize = 14.sp
|
||||
)
|
||||
AiScoreLoading()
|
||||
}
|
||||
|
||||
is AiEvaluationUiState.Error -> {
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
Text(
|
||||
text = state.error.toString(),
|
||||
color = Color.White.copy(alpha = 0.75f),
|
||||
fontSize = 14.sp
|
||||
)
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
TextButton(onClick = { requestToken += 1 }) {
|
||||
Text(stringResource(R.string.lut_creator_try_again), color = AccentOrange)
|
||||
}
|
||||
AiScoreError(onRetry = { requestToken += 1 })
|
||||
}
|
||||
|
||||
is AiEvaluationUiState.Success -> {
|
||||
Spacer(modifier = Modifier.height(24.dp))
|
||||
|
||||
if (state.evaluation.summary.isNotBlank()) {
|
||||
Text(
|
||||
text = state.evaluation.summary,
|
||||
color = Color.White.copy(alpha = 0.82f),
|
||||
fontSize = 14.sp,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
}
|
||||
|
||||
val dimensions = listOf(
|
||||
stringResource(R.string.gallery_ai_element_impact) to state.evaluation.scores.impact,
|
||||
stringResource(R.string.gallery_ai_element_technical_excellence) to state.evaluation.scores.technicalExcellence,
|
||||
stringResource(R.string.gallery_ai_element_creativity) to state.evaluation.scores.creativity,
|
||||
stringResource(R.string.gallery_ai_element_style) to state.evaluation.scores.style,
|
||||
stringResource(R.string.gallery_ai_element_composition) to state.evaluation.scores.composition,
|
||||
stringResource(R.string.gallery_ai_element_presentation) to state.evaluation.scores.presentation,
|
||||
stringResource(R.string.gallery_ai_element_color_balance) to state.evaluation.scores.colorBalance,
|
||||
stringResource(R.string.gallery_ai_element_center_of_interest) to state.evaluation.scores.centerOfInterest,
|
||||
stringResource(R.string.gallery_ai_element_lighting) to state.evaluation.scores.lighting,
|
||||
stringResource(R.string.gallery_ai_element_subject_matter) to state.evaluation.scores.subjectMatter,
|
||||
stringResource(R.string.gallery_ai_element_technique) to state.evaluation.scores.technique,
|
||||
stringResource(R.string.gallery_ai_element_storytelling) to state.evaluation.scores.storytelling
|
||||
)
|
||||
dimensions.forEach { (label, value) ->
|
||||
AiScoreDimensionRow(
|
||||
label = label,
|
||||
value = value,
|
||||
color = aiScoreColor(value)
|
||||
)
|
||||
}
|
||||
AiScoreReview(evaluation = state.evaluation)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1215,69 +1133,385 @@ private fun AiScoreBottomSheet(
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun AiScoreDimensionRow(
|
||||
label: String,
|
||||
value: Int,
|
||||
color: Color
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 8.dp),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
private fun AiScoreLoading() {
|
||||
Surface(
|
||||
color = AiEditorialSurface,
|
||||
shape = RoundedCornerShape(24.dp),
|
||||
border = BorderStroke(1.dp, AiEditorialOnSurface.copy(alpha = 0.08f)),
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
) {
|
||||
Text(
|
||||
text = label,
|
||||
color = Color.White.copy(alpha = 0.7f),
|
||||
fontSize = 12.sp,
|
||||
modifier = Modifier.width(128.dp)
|
||||
)
|
||||
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.height(8.dp)
|
||||
.background(Color.White.copy(alpha = 0.1f), CircleShape)
|
||||
Column(
|
||||
modifier = Modifier.padding(vertical = 44.dp, horizontal = 24.dp),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
val animValue by animateFloatAsState(
|
||||
targetValue = value.coerceIn(0, 100) / 100f,
|
||||
animationSpec = tween(1000, delayMillis = 500, easing = FastOutSlowInEasing),
|
||||
label = "dimen"
|
||||
CircularProgressIndicator(
|
||||
color = AiEditorialAccent,
|
||||
modifier = Modifier.size(30.dp),
|
||||
strokeWidth = 3.dp
|
||||
)
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxHeight()
|
||||
.fillMaxWidth(animValue)
|
||||
.background(color.copy(alpha = 0.8f), CircleShape)
|
||||
Spacer(modifier = Modifier.height(18.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.gallery_ai_analyzing),
|
||||
color = AiEditorialOnSurface,
|
||||
fontSize = 15.sp,
|
||||
fontWeight = FontWeight.Medium
|
||||
)
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.gallery_ai_analyzing_description),
|
||||
color = AiEditorialOnSurface.copy(alpha = 0.5f),
|
||||
fontSize = 13.sp,
|
||||
lineHeight = 19.sp
|
||||
)
|
||||
}
|
||||
|
||||
Text(
|
||||
text = value.coerceIn(0, 100).toString(),
|
||||
color = color,
|
||||
fontSize = 14.sp,
|
||||
modifier = Modifier
|
||||
.width(40.dp)
|
||||
.padding(start = 8.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun AiScoreError(onRetry: () -> Unit) {
|
||||
Surface(
|
||||
color = AiEditorialSurface,
|
||||
shape = RoundedCornerShape(24.dp),
|
||||
border = BorderStroke(1.dp, AiEditorialOnSurface.copy(alpha = 0.08f)),
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier.padding(24.dp),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Default.Info,
|
||||
contentDescription = null,
|
||||
tint = Color(0xFFD98270),
|
||||
modifier = Modifier.size(30.dp)
|
||||
)
|
||||
Spacer(modifier = Modifier.height(14.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.gallery_ai_analysis_failed),
|
||||
color = AiEditorialOnSurface,
|
||||
fontSize = 15.sp,
|
||||
fontWeight = FontWeight.Medium
|
||||
)
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.gallery_ai_analysis_failed_description),
|
||||
color = AiEditorialOnSurface.copy(alpha = 0.55f),
|
||||
fontSize = 13.sp,
|
||||
lineHeight = 19.sp
|
||||
)
|
||||
Spacer(modifier = Modifier.height(14.dp))
|
||||
TextButton(onClick = onRetry) {
|
||||
Text(
|
||||
text = stringResource(R.string.lut_creator_try_again),
|
||||
color = AiEditorialAccent,
|
||||
fontWeight = FontWeight.SemiBold
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun AiScoreReview(evaluation: AiPhotoEvaluation) {
|
||||
val score = evaluation.overallScore
|
||||
val scoreColor = aiScoreColor(score)
|
||||
val rankText = when {
|
||||
score >= 90 -> stringResource(R.string.gallery_ai_rank_excellent_plus)
|
||||
score >= 82 -> stringResource(R.string.gallery_ai_rank_excellent)
|
||||
score >= 74 -> stringResource(R.string.gallery_ai_rank_good)
|
||||
score >= 65 -> stringResource(R.string.gallery_ai_rank_pass)
|
||||
else -> stringResource(R.string.gallery_ai_rank_needs_work)
|
||||
}
|
||||
val animatedProgress by animateFloatAsState(
|
||||
targetValue = score / 100f,
|
||||
animationSpec = tween(1200, easing = FastOutSlowInEasing),
|
||||
label = "overallScoreProgress"
|
||||
)
|
||||
val animatedScore by animateIntAsState(
|
||||
targetValue = score,
|
||||
animationSpec = tween(1200, easing = FastOutSlowInEasing),
|
||||
label = "overallScore"
|
||||
)
|
||||
|
||||
Surface(
|
||||
color = AiEditorialSurface,
|
||||
shape = RoundedCornerShape(24.dp),
|
||||
border = BorderStroke(1.dp, AiEditorialOnSurface.copy(alpha = 0.08f)),
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
) {
|
||||
Column(modifier = Modifier.padding(22.dp)) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
Text(
|
||||
text = stringResource(R.string.gallery_ai_score_label),
|
||||
color = AiEditorialOnSurface.copy(alpha = 0.48f),
|
||||
fontSize = 11.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
letterSpacing = 1.1.sp
|
||||
)
|
||||
Row(verticalAlignment = Alignment.Bottom) {
|
||||
Text(
|
||||
text = animatedScore.toString(),
|
||||
color = scoreColor,
|
||||
fontSize = 56.sp,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
lineHeight = 58.sp
|
||||
)
|
||||
Text(
|
||||
text = stringResource(R.string.gallery_ai_score_out_of),
|
||||
color = AiEditorialOnSurface.copy(alpha = 0.42f),
|
||||
fontSize = 14.sp,
|
||||
modifier = Modifier.padding(bottom = 9.dp, start = 4.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
Surface(
|
||||
color = scoreColor.copy(alpha = 0.12f),
|
||||
shape = CircleShape,
|
||||
border = BorderStroke(1.dp, scoreColor.copy(alpha = 0.28f))
|
||||
) {
|
||||
Text(
|
||||
text = rankText,
|
||||
color = scoreColor,
|
||||
fontSize = 12.sp,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
modifier = Modifier.padding(horizontal = 13.dp, vertical = 7.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(14.dp))
|
||||
LinearProgressIndicator(
|
||||
progress = { animatedProgress },
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(5.dp)
|
||||
.clip(CircleShape),
|
||||
color = scoreColor,
|
||||
trackColor = AiEditorialOnSurface.copy(alpha = 0.08f),
|
||||
strokeCap = androidx.compose.ui.graphics.StrokeCap.Round
|
||||
)
|
||||
Spacer(modifier = Modifier.height(22.dp))
|
||||
HorizontalDivider(color = AiEditorialOnSurface.copy(alpha = 0.08f))
|
||||
Spacer(modifier = Modifier.height(18.dp))
|
||||
Text(
|
||||
text = evaluation.verdict,
|
||||
color = AiEditorialOnSurface.copy(alpha = 0.88f),
|
||||
fontSize = 16.sp,
|
||||
lineHeight = 24.sp
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
AiEditorialCallout(
|
||||
title = stringResource(R.string.gallery_ai_strength),
|
||||
text = evaluation.strength,
|
||||
icon = AppIcons.AutoAwesome,
|
||||
accent = AiEditorialAccent
|
||||
)
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
AiEditorialCallout(
|
||||
title = stringResource(R.string.gallery_ai_next_step),
|
||||
text = evaluation.improvement,
|
||||
icon = AppIcons.AutoMirroredArrowRight,
|
||||
accent = Color(0xFF8FAEA3)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(28.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.gallery_ai_criteria_title),
|
||||
color = AiEditorialOnSurface,
|
||||
fontSize = 17.sp,
|
||||
fontWeight = FontWeight.SemiBold
|
||||
)
|
||||
Spacer(modifier = Modifier.height(5.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.gallery_ai_criteria_description),
|
||||
color = AiEditorialOnSurface.copy(alpha = 0.48f),
|
||||
fontSize = 12.sp,
|
||||
lineHeight = 18.sp
|
||||
)
|
||||
Spacer(modifier = Modifier.height(14.dp))
|
||||
|
||||
val criteria = listOf(
|
||||
stringResource(R.string.gallery_ai_criterion_visual_impact) to
|
||||
evaluation.scores.visualImpact,
|
||||
stringResource(R.string.gallery_ai_criterion_originality_voice) to
|
||||
evaluation.scores.originalityAndVoice,
|
||||
stringResource(R.string.gallery_ai_criterion_narrative_meaning) to
|
||||
evaluation.scores.narrativeAndMeaning,
|
||||
stringResource(R.string.gallery_ai_criterion_intent_coherence) to
|
||||
evaluation.scores.intentAndCoherence,
|
||||
stringResource(R.string.gallery_ai_criterion_aesthetic_technical) to
|
||||
evaluation.scores.aestheticAndTechnicalExecution
|
||||
)
|
||||
criteria.forEachIndexed { index, (label, criterion) ->
|
||||
AiScoreCriterionCard(
|
||||
index = index + 1,
|
||||
label = label,
|
||||
criterion = criterion
|
||||
)
|
||||
if (index != criteria.lastIndex) {
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
}
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(18.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.gallery_ai_scale_note),
|
||||
color = AiEditorialOnSurface.copy(alpha = 0.38f),
|
||||
fontSize = 11.sp,
|
||||
lineHeight = 16.sp,
|
||||
modifier = Modifier.padding(horizontal = 4.dp)
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun AiEditorialCallout(
|
||||
title: String,
|
||||
text: String,
|
||||
icon: ImageVector,
|
||||
accent: Color
|
||||
) {
|
||||
Surface(
|
||||
color = accent.copy(alpha = 0.08f),
|
||||
shape = RoundedCornerShape(18.dp),
|
||||
border = BorderStroke(1.dp, accent.copy(alpha = 0.18f)),
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier.padding(17.dp),
|
||||
verticalAlignment = Alignment.Top
|
||||
) {
|
||||
Icon(
|
||||
imageVector = icon,
|
||||
contentDescription = null,
|
||||
tint = accent,
|
||||
modifier = Modifier
|
||||
.padding(top = 1.dp)
|
||||
.size(19.dp)
|
||||
)
|
||||
Spacer(modifier = Modifier.width(13.dp))
|
||||
Column {
|
||||
Text(
|
||||
text = title,
|
||||
color = accent,
|
||||
fontSize = 11.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
letterSpacing = 0.8.sp
|
||||
)
|
||||
Spacer(modifier = Modifier.height(5.dp))
|
||||
Text(
|
||||
text = text,
|
||||
color = AiEditorialOnSurface.copy(alpha = 0.78f),
|
||||
fontSize = 14.sp,
|
||||
lineHeight = 20.sp
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun AiScoreCriterionCard(
|
||||
index: Int,
|
||||
label: String,
|
||||
criterion: AiPhotoCriterion
|
||||
) {
|
||||
val color = aiScoreColor(criterion.score)
|
||||
val animatedProgress by animateFloatAsState(
|
||||
targetValue = criterion.score / 100f,
|
||||
animationSpec = tween(
|
||||
durationMillis = 900,
|
||||
delayMillis = index * 90,
|
||||
easing = FastOutSlowInEasing
|
||||
),
|
||||
label = "criterionScore$index"
|
||||
)
|
||||
|
||||
Surface(
|
||||
color = AiEditorialSurface,
|
||||
shape = RoundedCornerShape(18.dp),
|
||||
border = BorderStroke(1.dp, AiEditorialOnSurface.copy(alpha = 0.07f)),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
) {
|
||||
Column(modifier = Modifier.padding(17.dp)) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
Text(
|
||||
text = index.toString().padStart(2, '0'),
|
||||
color = AiEditorialAccent.copy(alpha = 0.72f),
|
||||
fontSize = 11.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
letterSpacing = 1.sp,
|
||||
modifier = Modifier.width(30.dp)
|
||||
)
|
||||
Text(
|
||||
text = label,
|
||||
color = AiEditorialOnSurface.copy(alpha = 0.86f),
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.weight(1f)
|
||||
)
|
||||
Text(
|
||||
text = criterion.score.toString(),
|
||||
color = color,
|
||||
fontSize = 17.sp,
|
||||
fontWeight = FontWeight.SemiBold
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(4.dp)
|
||||
.background(AiEditorialOnSurface.copy(alpha = 0.08f), CircleShape)
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxHeight()
|
||||
.fillMaxWidth(animatedProgress)
|
||||
.background(color, CircleShape)
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
Text(
|
||||
text = criterion.feedback,
|
||||
color = AiEditorialOnSurface.copy(alpha = 0.58f),
|
||||
fontSize = 13.sp,
|
||||
lineHeight = 19.sp
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val AiEditorialBackground = Color(0xFF11110F)
|
||||
private val AiEditorialSurface = Color(0xFF1A1A17)
|
||||
private val AiEditorialOnSurface = Color(0xFFF3EFE7)
|
||||
private val AiEditorialAccent = Color(0xFFE7904F)
|
||||
|
||||
private fun aiScoreColor(score: Int): Color =
|
||||
when {
|
||||
score >= 90 -> Color(0xFFF0C96B)
|
||||
score >= 82 -> AiEditorialAccent
|
||||
score >= 74 -> Color(0xFFD7A36D)
|
||||
score >= 65 -> Color(0xFFB8B2A7)
|
||||
else -> Color(0xFFD98270)
|
||||
}
|
||||
|
||||
private sealed class AiEvaluationUiState {
|
||||
object Loading : AiEvaluationUiState()
|
||||
data class Success(val evaluation: AiPhotoEvaluation) : AiEvaluationUiState()
|
||||
data class Error(val error: Throwable) : AiEvaluationUiState()
|
||||
}
|
||||
|
||||
private fun aiScoreColor(score: Int): Color =
|
||||
when {
|
||||
score >= 90 -> Color(0xFFFFD700)
|
||||
score >= 80 -> Color(0xFF4CAF50)
|
||||
score >= 70 -> Color(0xFF8BC34A)
|
||||
score >= 60 -> Color.White.copy(alpha = 0.8f)
|
||||
else -> Color(0xFFFF5252)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun HdrStrengthPanel(
|
||||
enabled: Boolean,
|
||||
|
||||
@@ -952,27 +952,31 @@
|
||||
<string name="lut_creator_finish">完成</string>
|
||||
<string name="lut_creator_error">錯誤:%s</string>
|
||||
<string name="lut_creator_try_again">再試一次</string>
|
||||
<string name="gallery_ai_analysis">AI 分析</string>
|
||||
<string name="gallery_ai_quality_title">AI 攝影分析</string>
|
||||
<string name="gallery_ai_premium_required">AI 相片分析是 Pro 功能,升級后可解鎖 AI 評分與點評。</string>
|
||||
<string name="gallery_ai_analyzing">正在分析相片…</string>
|
||||
<string name="gallery_ai_rank_excellent_plus">非常優秀</string>
|
||||
<string name="gallery_ai_rank_excellent">優秀</string>
|
||||
<string name="gallery_ai_rank_good">良好</string>
|
||||
<string name="gallery_ai_rank_pass">及格</string>
|
||||
<string name="gallery_ai_rank_needs_work">待改進</string>
|
||||
<string name="gallery_ai_element_impact">視覺沖擊力</string>
|
||||
<string name="gallery_ai_element_technical_excellence">技術卓越性</string>
|
||||
<string name="gallery_ai_element_creativity">創造力</string>
|
||||
<string name="gallery_ai_element_style">風格</string>
|
||||
<string name="gallery_ai_element_composition">構圖</string>
|
||||
<string name="gallery_ai_element_presentation">呈現方式</string>
|
||||
<string name="gallery_ai_element_color_balance">色彩平衡</string>
|
||||
<string name="gallery_ai_element_center_of_interest">視覺中心</string>
|
||||
<string name="gallery_ai_element_lighting">光影</string>
|
||||
<string name="gallery_ai_element_subject_matter">主題</string>
|
||||
<string name="gallery_ai_element_technique">技法</string>
|
||||
<string name="gallery_ai_element_storytelling">故事性</string>
|
||||
<string name="gallery_ai_analysis">AI 評審</string>
|
||||
<string name="gallery_ai_quality_title">AI 攝影評審</string>
|
||||
<string name="gallery_ai_premium_required">AI 攝影評審是 Pro 功能,升級後可解鎖評審式評分與點評。</string>
|
||||
<string name="gallery_ai_analyzing">正在評審相片…</string>
|
||||
<string name="gallery_ai_analyzing_description">依據畫面中的可見證據,評估五項編輯評審標準。</string>
|
||||
<string name="gallery_ai_analysis_failed">未能完成評審</string>
|
||||
<string name="gallery_ai_analysis_failed_description">請檢查 AI 服務設定和網絡連線,然後重試。</string>
|
||||
<string name="gallery_ai_rank_excellent_plus">獲獎水準</string>
|
||||
<string name="gallery_ai_rank_excellent">風格鮮明</string>
|
||||
<string name="gallery_ai_rank_good">表現紮實</string>
|
||||
<string name="gallery_ai_rank_pass">潛力可見</string>
|
||||
<string name="gallery_ai_rank_needs_work">有待打磨</string>
|
||||
<string name="gallery_ai_editorial_framework">編輯評審 · 5 項標準</string>
|
||||
<string name="gallery_ai_score_label">評審得分</string>
|
||||
<string name="gallery_ai_score_out_of">/ 100</string>
|
||||
<string name="gallery_ai_strength">作品優勢</string>
|
||||
<string name="gallery_ai_next_step">改進方向</string>
|
||||
<string name="gallery_ai_criteria_title">分項評審</string>
|
||||
<string name="gallery_ai_criteria_description">各維度依據畫面中可見的證據獨立評分。</string>
|
||||
<string name="gallery_ai_criterion_visual_impact">視覺衝擊</string>
|
||||
<string name="gallery_ai_criterion_originality_voice">原創性與作者表達</string>
|
||||
<string name="gallery_ai_criterion_narrative_meaning">敘事與意義</string>
|
||||
<string name="gallery_ai_criterion_intent_coherence">意圖與一致性</string>
|
||||
<string name="gallery_ai_criterion_aesthetic_technical">審美與技術完成度</string>
|
||||
<string name="gallery_ai_scale_note">本評審參考 LensCulture 評審指引中反覆出現的原則;這是獨立的 AI 點評,並非 LensCulture 官方評分。</string>
|
||||
|
||||
<string name="settings_ai_model">AI 提取模型</string>
|
||||
<string name="settings_ai_model_desc">選擇 AI 模型。</string>
|
||||
|
||||
@@ -768,27 +768,31 @@
|
||||
<string name="lut_creator_finish">เสร็จ</string>
|
||||
<string name="lut_creator_error">ข้อผิดพลาด: %s</string>
|
||||
<string name="lut_creator_try_again">ลองอีกครั้ง</string>
|
||||
<string name="gallery_ai_analysis">การวิเคราะห์เอไอ</string>
|
||||
<string name="gallery_ai_quality_title">การวิเคราะห์การถ่ายภาพด้วย AI</string>
|
||||
<string name="gallery_ai_premium_required">การวิเคราะห์ภาพถ่าย AI เป็นฟีเจอร์ระดับ Pro และสามารถปลดล็อกการให้คะแนนและบทวิจารณ์ AI ได้หลังจากอัปเกรดแล้ว</string>
|
||||
<string name="gallery_ai_analyzing">กำลังวิเคราะห์รูปภาพ...</string>
|
||||
<string name="gallery_ai_rank_excellent_plus">ยอดเยี่ยมมาก</string>
|
||||
<string name="gallery_ai_rank_excellent">ยอดเยี่ยม</string>
|
||||
<string name="gallery_ai_rank_good">ดี</string>
|
||||
<string name="gallery_ai_rank_pass">ผ่าน</string>
|
||||
<string name="gallery_ai_rank_needs_work">ที่จะปรับปรุงให้ดีขึ้น</string>
|
||||
<string name="gallery_ai_element_impact">ผลกระทบต่อภาพ</string>
|
||||
<string name="gallery_ai_element_technical_excellence">ความเป็นเลิศทางเทคนิค</string>
|
||||
<string name="gallery_ai_element_creativity">ความคิดสร้างสรรค์</string>
|
||||
<string name="gallery_ai_element_style">สไตล์</string>
|
||||
<string name="gallery_ai_element_composition">องค์ประกอบ</string>
|
||||
<string name="gallery_ai_element_presentation">การนำเสนอ</string>
|
||||
<string name="gallery_ai_element_color_balance">ความสมดุลของสี</string>
|
||||
<string name="gallery_ai_element_center_of_interest">ศูนย์ภาพ</string>
|
||||
<string name="gallery_ai_element_lighting">แสงและเงา</string>
|
||||
<string name="gallery_ai_element_subject_matter">ธีม</string>
|
||||
<string name="gallery_ai_element_technique">เทคนิค</string>
|
||||
<string name="gallery_ai_element_storytelling">การเล่าเรื่อง</string>
|
||||
<string name="gallery_ai_analysis">บทวิจารณ์ AI</string>
|
||||
<string name="gallery_ai_quality_title">บทวิจารณ์ภาพถ่ายโดย AI</string>
|
||||
<string name="gallery_ai_premium_required">บทวิจารณ์ภาพถ่ายโดย AI เป็นฟีเจอร์ Pro อัปเกรดเพื่อปลดล็อกคะแนนและคำวิจารณ์ในมุมมองกรรมการ</string>
|
||||
<string name="gallery_ai_analyzing">กำลังวิจารณ์ภาพถ่าย…</string>
|
||||
<string name="gallery_ai_analyzing_description">กำลังประเมินเกณฑ์บรรณาธิการ 5 ด้านจากหลักฐานที่มองเห็นในภาพ</string>
|
||||
<string name="gallery_ai_analysis_failed">ไม่สามารถดำเนินการวิจารณ์ให้เสร็จสิ้น</string>
|
||||
<string name="gallery_ai_analysis_failed_description">ตรวจสอบการตั้งค่าบริการ AI และการเชื่อมต่อ แล้วลองอีกครั้ง</string>
|
||||
<string name="gallery_ai_rank_excellent_plus">พร้อมสำหรับรางวัล</string>
|
||||
<string name="gallery_ai_rank_excellent">โดดเด่น</string>
|
||||
<string name="gallery_ai_rank_good">แข็งแรง</string>
|
||||
<string name="gallery_ai_rank_pass">มีศักยภาพ</string>
|
||||
<string name="gallery_ai_rank_needs_work">กำลังพัฒนา</string>
|
||||
<string name="gallery_ai_editorial_framework">คณะกรรมการบรรณาธิการ · 5 เกณฑ์</string>
|
||||
<string name="gallery_ai_score_label">คะแนนกรรมการ</string>
|
||||
<string name="gallery_ai_score_out_of">/ 100</string>
|
||||
<string name="gallery_ai_strength">จุดที่ทำได้ดี</string>
|
||||
<string name="gallery_ai_next_step">ขั้นตอนถัดไป</string>
|
||||
<string name="gallery_ai_criteria_title">การประเมินรายเกณฑ์</string>
|
||||
<string name="gallery_ai_criteria_description">แต่ละเกณฑ์ให้คะแนนแยกกันจากหลักฐานที่มองเห็นในเฟรม</string>
|
||||
<string name="gallery_ai_criterion_visual_impact">พลังทางสายตา</string>
|
||||
<string name="gallery_ai_criterion_originality_voice">ความเป็นต้นฉบับและเสียงของผู้สร้าง</string>
|
||||
<string name="gallery_ai_criterion_narrative_meaning">เรื่องเล่าและความหมาย</string>
|
||||
<string name="gallery_ai_criterion_intent_coherence">เจตนาและความสอดคล้อง</string>
|
||||
<string name="gallery_ai_criterion_aesthetic_technical">สุนทรียะและเทคนิค</string>
|
||||
<string name="gallery_ai_scale_note">อ้างอิงหลักการที่ปรากฏซ้ำในแนวทางของกรรมการ LensCulture นี่คือคำวิจารณ์ AI อิสระ ไม่ใช่คะแนนอย่างเป็นทางการของ LensCulture</string>
|
||||
|
||||
<string name="settings_ai_model">แบบจำลองการสกัดด้วย AI</string>
|
||||
<string name="settings_ai_model_desc">เลือกแบบจำลอง AI</string>
|
||||
|
||||
@@ -952,27 +952,31 @@
|
||||
<string name="lut_creator_finish">完成</string>
|
||||
<string name="lut_creator_error">错误:%s</string>
|
||||
<string name="lut_creator_try_again">再试一次</string>
|
||||
<string name="gallery_ai_analysis">AI 分析</string>
|
||||
<string name="gallery_ai_quality_title">AI 摄影分析</string>
|
||||
<string name="gallery_ai_premium_required">AI 照片分析是 Pro 功能,升级后可解锁 AI 评分与点评。</string>
|
||||
<string name="gallery_ai_analyzing">正在分析照片…</string>
|
||||
<string name="gallery_ai_rank_excellent_plus">非常优秀</string>
|
||||
<string name="gallery_ai_rank_excellent">优秀</string>
|
||||
<string name="gallery_ai_rank_good">良好</string>
|
||||
<string name="gallery_ai_rank_pass">及格</string>
|
||||
<string name="gallery_ai_rank_needs_work">待改进</string>
|
||||
<string name="gallery_ai_element_impact">视觉冲击力</string>
|
||||
<string name="gallery_ai_element_technical_excellence">技术卓越性</string>
|
||||
<string name="gallery_ai_element_creativity">创造力</string>
|
||||
<string name="gallery_ai_element_style">风格</string>
|
||||
<string name="gallery_ai_element_composition">构图</string>
|
||||
<string name="gallery_ai_element_presentation">呈现方式</string>
|
||||
<string name="gallery_ai_element_color_balance">色彩平衡</string>
|
||||
<string name="gallery_ai_element_center_of_interest">视觉中心</string>
|
||||
<string name="gallery_ai_element_lighting">光影</string>
|
||||
<string name="gallery_ai_element_subject_matter">主题</string>
|
||||
<string name="gallery_ai_element_technique">技法</string>
|
||||
<string name="gallery_ai_element_storytelling">故事性</string>
|
||||
<string name="gallery_ai_analysis">AI 评审</string>
|
||||
<string name="gallery_ai_quality_title">AI 摄影评审</string>
|
||||
<string name="gallery_ai_premium_required">AI 摄影评审是 Pro 功能,升级后可解锁评委式评分与点评。</string>
|
||||
<string name="gallery_ai_analyzing">正在评审照片…</string>
|
||||
<string name="gallery_ai_analyzing_description">依据画面中的可见证据,评估五项编辑评审标准。</string>
|
||||
<string name="gallery_ai_analysis_failed">未能完成评审</string>
|
||||
<string name="gallery_ai_analysis_failed_description">请检查 AI 服务设置和网络连接,然后重试。</string>
|
||||
<string name="gallery_ai_rank_excellent_plus">获奖水准</string>
|
||||
<string name="gallery_ai_rank_excellent">风格鲜明</string>
|
||||
<string name="gallery_ai_rank_good">表现扎实</string>
|
||||
<string name="gallery_ai_rank_pass">潜力可见</string>
|
||||
<string name="gallery_ai_rank_needs_work">有待打磨</string>
|
||||
<string name="gallery_ai_editorial_framework">编辑评审 · 5 项标准</string>
|
||||
<string name="gallery_ai_score_label">评审得分</string>
|
||||
<string name="gallery_ai_score_out_of">/ 100</string>
|
||||
<string name="gallery_ai_strength">作品优势</string>
|
||||
<string name="gallery_ai_next_step">改进方向</string>
|
||||
<string name="gallery_ai_criteria_title">分项评审</string>
|
||||
<string name="gallery_ai_criteria_description">各维度依据画面中可见的证据独立评分。</string>
|
||||
<string name="gallery_ai_criterion_visual_impact">视觉冲击</string>
|
||||
<string name="gallery_ai_criterion_originality_voice">原创性与作者表达</string>
|
||||
<string name="gallery_ai_criterion_narrative_meaning">叙事与意义</string>
|
||||
<string name="gallery_ai_criterion_intent_coherence">意图与一致性</string>
|
||||
<string name="gallery_ai_criterion_aesthetic_technical">审美与技术完成度</string>
|
||||
<string name="gallery_ai_scale_note">本评审参考 LensCulture 评委指引中反复出现的原则;这是独立的 AI 点评,并非 LensCulture 官方评分。</string>
|
||||
|
||||
<string name="settings_ai_model">AI 提取模型</string>
|
||||
<string name="settings_ai_model_desc">选择 AI 模型。</string>
|
||||
|
||||
@@ -952,27 +952,31 @@
|
||||
<string name="lut_creator_finish">完成</string>
|
||||
<string name="lut_creator_error">錯誤:%s</string>
|
||||
<string name="lut_creator_try_again">再試一次</string>
|
||||
<string name="gallery_ai_analysis">AI 分析</string>
|
||||
<string name="gallery_ai_quality_title">AI 攝影分析</string>
|
||||
<string name="gallery_ai_premium_required">AI 相片分析是 Pro 功能,升級后可解鎖 AI 評分與點評。</string>
|
||||
<string name="gallery_ai_analyzing">正在分析相片…</string>
|
||||
<string name="gallery_ai_rank_excellent_plus">非常優秀</string>
|
||||
<string name="gallery_ai_rank_excellent">優秀</string>
|
||||
<string name="gallery_ai_rank_good">良好</string>
|
||||
<string name="gallery_ai_rank_pass">及格</string>
|
||||
<string name="gallery_ai_rank_needs_work">待改進</string>
|
||||
<string name="gallery_ai_element_impact">視覺沖擊力</string>
|
||||
<string name="gallery_ai_element_technical_excellence">技術卓越性</string>
|
||||
<string name="gallery_ai_element_creativity">創造力</string>
|
||||
<string name="gallery_ai_element_style">風格</string>
|
||||
<string name="gallery_ai_element_composition">構圖</string>
|
||||
<string name="gallery_ai_element_presentation">呈現方式</string>
|
||||
<string name="gallery_ai_element_color_balance">色彩平衡</string>
|
||||
<string name="gallery_ai_element_center_of_interest">視覺中心</string>
|
||||
<string name="gallery_ai_element_lighting">光影</string>
|
||||
<string name="gallery_ai_element_subject_matter">主題</string>
|
||||
<string name="gallery_ai_element_technique">技法</string>
|
||||
<string name="gallery_ai_element_storytelling">故事性</string>
|
||||
<string name="gallery_ai_analysis">AI 評審</string>
|
||||
<string name="gallery_ai_quality_title">AI 攝影評審</string>
|
||||
<string name="gallery_ai_premium_required">AI 攝影評審是 Pro 功能,升級後可解鎖評審式評分與點評。</string>
|
||||
<string name="gallery_ai_analyzing">正在評審相片…</string>
|
||||
<string name="gallery_ai_analyzing_description">依據畫面中的可見證據,評估五項編輯評審標準。</string>
|
||||
<string name="gallery_ai_analysis_failed">未能完成評審</string>
|
||||
<string name="gallery_ai_analysis_failed_description">請檢查 AI 服務設定和網絡連線,然後重試。</string>
|
||||
<string name="gallery_ai_rank_excellent_plus">獲獎水準</string>
|
||||
<string name="gallery_ai_rank_excellent">風格鮮明</string>
|
||||
<string name="gallery_ai_rank_good">表現紮實</string>
|
||||
<string name="gallery_ai_rank_pass">潛力可見</string>
|
||||
<string name="gallery_ai_rank_needs_work">有待打磨</string>
|
||||
<string name="gallery_ai_editorial_framework">編輯評審 · 5 項標準</string>
|
||||
<string name="gallery_ai_score_label">評審得分</string>
|
||||
<string name="gallery_ai_score_out_of">/ 100</string>
|
||||
<string name="gallery_ai_strength">作品優勢</string>
|
||||
<string name="gallery_ai_next_step">改進方向</string>
|
||||
<string name="gallery_ai_criteria_title">分項評審</string>
|
||||
<string name="gallery_ai_criteria_description">各維度依據畫面中可見的證據獨立評分。</string>
|
||||
<string name="gallery_ai_criterion_visual_impact">視覺衝擊</string>
|
||||
<string name="gallery_ai_criterion_originality_voice">原創性與作者表達</string>
|
||||
<string name="gallery_ai_criterion_narrative_meaning">敘事與意義</string>
|
||||
<string name="gallery_ai_criterion_intent_coherence">意圖與一致性</string>
|
||||
<string name="gallery_ai_criterion_aesthetic_technical">審美與技術完成度</string>
|
||||
<string name="gallery_ai_scale_note">本評審參考 LensCulture 評審指引中反覆出現的原則;這是獨立的 AI 點評,並非 LensCulture 官方評分。</string>
|
||||
|
||||
<string name="settings_ai_model">AI 提取模型</string>
|
||||
<string name="settings_ai_model_desc">選擇 AI 模型。</string>
|
||||
|
||||
@@ -952,27 +952,31 @@
|
||||
<string name="lut_creator_finish">完成</string>
|
||||
<string name="lut_creator_error">錯誤:%s</string>
|
||||
<string name="lut_creator_try_again">再試一次</string>
|
||||
<string name="gallery_ai_analysis">AI 分析</string>
|
||||
<string name="gallery_ai_quality_title">AI 攝影分析</string>
|
||||
<string name="gallery_ai_premium_required">AI 相片分析是 Pro 功能,升級后可解鎖 AI 評分與點評。</string>
|
||||
<string name="gallery_ai_analyzing">正在分析相片…</string>
|
||||
<string name="gallery_ai_rank_excellent_plus">非常優秀</string>
|
||||
<string name="gallery_ai_rank_excellent">優秀</string>
|
||||
<string name="gallery_ai_rank_good">良好</string>
|
||||
<string name="gallery_ai_rank_pass">及格</string>
|
||||
<string name="gallery_ai_rank_needs_work">待改進</string>
|
||||
<string name="gallery_ai_element_impact">視覺沖擊力</string>
|
||||
<string name="gallery_ai_element_technical_excellence">技術卓越性</string>
|
||||
<string name="gallery_ai_element_creativity">創造力</string>
|
||||
<string name="gallery_ai_element_style">風格</string>
|
||||
<string name="gallery_ai_element_composition">構圖</string>
|
||||
<string name="gallery_ai_element_presentation">呈現方式</string>
|
||||
<string name="gallery_ai_element_color_balance">色彩平衡</string>
|
||||
<string name="gallery_ai_element_center_of_interest">視覺中心</string>
|
||||
<string name="gallery_ai_element_lighting">光影</string>
|
||||
<string name="gallery_ai_element_subject_matter">主題</string>
|
||||
<string name="gallery_ai_element_technique">技法</string>
|
||||
<string name="gallery_ai_element_storytelling">故事性</string>
|
||||
<string name="gallery_ai_analysis">AI 評審</string>
|
||||
<string name="gallery_ai_quality_title">AI 攝影評審</string>
|
||||
<string name="gallery_ai_premium_required">AI 攝影評審是 Pro 功能,升級後可解鎖評審式評分與點評。</string>
|
||||
<string name="gallery_ai_analyzing">正在評審相片…</string>
|
||||
<string name="gallery_ai_analyzing_description">依據畫面中的可見證據,評估五項編輯評審標準。</string>
|
||||
<string name="gallery_ai_analysis_failed">未能完成評審</string>
|
||||
<string name="gallery_ai_analysis_failed_description">請檢查 AI 服務設定和網路連線,然後重試。</string>
|
||||
<string name="gallery_ai_rank_excellent_plus">獲獎水準</string>
|
||||
<string name="gallery_ai_rank_excellent">風格鮮明</string>
|
||||
<string name="gallery_ai_rank_good">表現紮實</string>
|
||||
<string name="gallery_ai_rank_pass">潛力可見</string>
|
||||
<string name="gallery_ai_rank_needs_work">有待打磨</string>
|
||||
<string name="gallery_ai_editorial_framework">編輯評審 · 5 項標準</string>
|
||||
<string name="gallery_ai_score_label">評審得分</string>
|
||||
<string name="gallery_ai_score_out_of">/ 100</string>
|
||||
<string name="gallery_ai_strength">作品優勢</string>
|
||||
<string name="gallery_ai_next_step">改進方向</string>
|
||||
<string name="gallery_ai_criteria_title">分項評審</string>
|
||||
<string name="gallery_ai_criteria_description">各維度依據畫面中可見的證據獨立評分。</string>
|
||||
<string name="gallery_ai_criterion_visual_impact">視覺衝擊</string>
|
||||
<string name="gallery_ai_criterion_originality_voice">原創性與作者表達</string>
|
||||
<string name="gallery_ai_criterion_narrative_meaning">敘事與意義</string>
|
||||
<string name="gallery_ai_criterion_intent_coherence">意圖與一致性</string>
|
||||
<string name="gallery_ai_criterion_aesthetic_technical">審美與技術完成度</string>
|
||||
<string name="gallery_ai_scale_note">本評審參考 LensCulture 評審指引中反覆出現的原則;這是獨立的 AI 點評,並非 LensCulture 官方評分。</string>
|
||||
|
||||
<string name="settings_ai_model">AI 提取模型</string>
|
||||
<string name="settings_ai_model_desc">選擇 AI 模型。</string>
|
||||
|
||||
@@ -953,27 +953,31 @@
|
||||
<string name="lut_creator_finish">Finish</string>
|
||||
<string name="lut_creator_error">Error: %s</string>
|
||||
<string name="lut_creator_try_again">Try Again</string>
|
||||
<string name="gallery_ai_analysis">AI Analysis</string>
|
||||
<string name="gallery_ai_quality_title">AI Photo Analysis</string>
|
||||
<string name="gallery_ai_premium_required">AI photo analysis is a Pro feature. Upgrade to unlock AI scoring and comments.</string>
|
||||
<string name="gallery_ai_analyzing">Analyzing photo...</string>
|
||||
<string name="gallery_ai_rank_excellent_plus">Outstanding</string>
|
||||
<string name="gallery_ai_rank_excellent">Excellent</string>
|
||||
<string name="gallery_ai_rank_good">Good</string>
|
||||
<string name="gallery_ai_rank_pass">Pass</string>
|
||||
<string name="gallery_ai_rank_needs_work">Needs Work</string>
|
||||
<string name="gallery_ai_element_impact">Impact</string>
|
||||
<string name="gallery_ai_element_technical_excellence">Technical</string>
|
||||
<string name="gallery_ai_element_creativity">Creativity</string>
|
||||
<string name="gallery_ai_element_style">Style</string>
|
||||
<string name="gallery_ai_element_composition">Composition</string>
|
||||
<string name="gallery_ai_element_presentation">Presentation</string>
|
||||
<string name="gallery_ai_element_color_balance">Color Balance</string>
|
||||
<string name="gallery_ai_element_center_of_interest">Center</string>
|
||||
<string name="gallery_ai_element_lighting">Lighting</string>
|
||||
<string name="gallery_ai_element_subject_matter">Subject</string>
|
||||
<string name="gallery_ai_element_technique">Technique</string>
|
||||
<string name="gallery_ai_element_storytelling">Storytelling</string>
|
||||
<string name="gallery_ai_analysis">AI Review</string>
|
||||
<string name="gallery_ai_quality_title">AI Photo Review</string>
|
||||
<string name="gallery_ai_premium_required">AI photo review is a Pro feature. Upgrade to unlock jury-style scoring and critique.</string>
|
||||
<string name="gallery_ai_analyzing">Reviewing the photograph…</string>
|
||||
<string name="gallery_ai_analyzing_description">Evaluating five editorial criteria and grounding the critique in visible evidence.</string>
|
||||
<string name="gallery_ai_analysis_failed">The review could not be completed</string>
|
||||
<string name="gallery_ai_analysis_failed_description">Check your AI service settings and connection, then try again.</string>
|
||||
<string name="gallery_ai_rank_excellent_plus">Award-ready</string>
|
||||
<string name="gallery_ai_rank_excellent">Distinctive</string>
|
||||
<string name="gallery_ai_rank_good">Strong</string>
|
||||
<string name="gallery_ai_rank_pass">Promising</string>
|
||||
<string name="gallery_ai_rank_needs_work">Developing</string>
|
||||
<string name="gallery_ai_editorial_framework">EDITORIAL JURY · 5 CRITERIA</string>
|
||||
<string name="gallery_ai_score_label">JURY SCORE</string>
|
||||
<string name="gallery_ai_score_out_of">/ 100</string>
|
||||
<string name="gallery_ai_strength">WHAT WORKS</string>
|
||||
<string name="gallery_ai_next_step">NEXT STEP</string>
|
||||
<string name="gallery_ai_criteria_title">Criteria review</string>
|
||||
<string name="gallery_ai_criteria_description">Each criterion is scored independently from evidence visible in the frame.</string>
|
||||
<string name="gallery_ai_criterion_visual_impact">Visual Impact</string>
|
||||
<string name="gallery_ai_criterion_originality_voice">Originality & Voice</string>
|
||||
<string name="gallery_ai_criterion_narrative_meaning">Narrative & Meaning</string>
|
||||
<string name="gallery_ai_criterion_intent_coherence">Intent & Coherence</string>
|
||||
<string name="gallery_ai_criterion_aesthetic_technical">Aesthetic & Technical</string>
|
||||
<string name="gallery_ai_scale_note">Inspired by recurring principles in LensCulture juror guidance; this is an independent AI critique, not an official LensCulture score.</string>
|
||||
|
||||
<string name="settings_ai_model">AI Model</string>
|
||||
<string name="settings_ai_model_desc">Select the model for AI.</string>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.hinnka.mycamera.lut.creator
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
class AiPhotoCriteriaScoresTest {
|
||||
|
||||
@Test
|
||||
fun weightedOverallScoreUsesEditorialCriterionWeights() {
|
||||
fun criterion(score: Int) = AiPhotoCriterion(score = score, feedback = "Evidence")
|
||||
|
||||
val scores = AiPhotoCriteriaScores(
|
||||
visualImpact = criterion(90),
|
||||
originalityAndVoice = criterion(80),
|
||||
narrativeAndMeaning = criterion(70),
|
||||
intentAndCoherence = criterion(60),
|
||||
aestheticAndTechnicalExecution = criterion(50)
|
||||
)
|
||||
|
||||
assertEquals(72, scores.weightedOverallScore())
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user