Skip to content

Commit

Permalink
IT ONLY BLOODY WORKS
Browse files Browse the repository at this point in the history
  • Loading branch information
Webreaper committed Mar 5, 2024
1 parent cd46c87 commit 83f2063
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Damselfly.ML.FaceONNX/FaceONNXService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ private IEnumerable<FaceONNXFace> GetFacesFromImage(Image<Rgb24> image)
var row = pixelAccessor.GetRowSpan(y);
for(var x = 0; x < pixelAccessor.Width; x++ )
{
array[0][y, x] = row[x].R;
array[1][y, x] = row[x].G;
array[2][y, x] = row[x].B;
array[0][y, x] = row[x].R / 255.0F;
array[1][y, x] = row[x].G / 255.0F;
array[2][y, x] = row[x].B / 255.0F;
}
}
});
Expand All @@ -104,13 +104,10 @@ private IEnumerable<FaceONNXFace> GetFacesFromImage(Image<Rgb24> image)
throw;
}

foreach( var face in detectResults.Take( 2 ) )
foreach( var face in detectResults )
{
if ( !face.Box.IsEmpty )
{
//if( face.Score < 0.985 )
// continue;

// landmarks
var points = _faceLandmarksExtractor.Forward(array, face.Box);
var angle = points.GetRotationAngle();
Expand Down

0 comments on commit 83f2063

Please sign in to comment.