Skip to content

Commit

Permalink
fix face suite
Browse files Browse the repository at this point in the history
  • Loading branch information
mhamilton723 committed Oct 10, 2023
1 parent aeee73e commit 65b4c0a
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ class DetectFaceSuite extends TransformerFuzzing[DetectFace] with CognitiveKey {
.setOutputCol("face")
.setReturnFaceId(true)
.setReturnFaceLandmarks(true)
.setReturnFaceAttributes(Seq(
"age", "gender", "headPose", "smile", "facialHair", "glasses", "emotion",
"hair", "makeup", "occlusion", "accessories", "blur", "exposure", "noise"))
.setReturnFaceAttributes(Seq("exposure"))

override def assertDFEq(df1: DataFrame, df2: DataFrame)(implicit eq: Equality[DataFrame]): Unit = {
def prep(df: DataFrame) = df.select(explode(col("face"))).select("col.*").drop("faceId")
Expand All @@ -47,7 +45,7 @@ class DetectFaceSuite extends TransformerFuzzing[DetectFace] with CognitiveKey {
results.show(truncate=false)

val f1 = fromRow(results.select("face").collect().head.getSeq[Row](0).head)
assert(f1.faceAttributes.get.age.get > 20)
assert(f1.faceAttributes.get.exposure.get.value != 0.0)

results.show(truncate = false)
}
Expand Down

0 comments on commit 65b4c0a

Please sign in to comment.