Mass push
This commit is contained in:
@ -26,7 +26,7 @@ public class FaceRecognition : DisposableObject
|
||||
private readonly ShapePredictor _PosePredictor5Point;
|
||||
private readonly ShapePredictor _PosePredictor68Point;
|
||||
|
||||
public FaceRecognition(int numberOfTimesToUpsample, int numberOfJitters, PredictorModel predictorModel, Model model, ModelParameter modelParameter)
|
||||
public FaceRecognition(int numberOfJitters, int numberOfTimesToUpsample, Model model, ModelParameter modelParameter, PredictorModel predictorModel)
|
||||
{
|
||||
if (modelParameter is null)
|
||||
throw new NullReferenceException(nameof(modelParameter));
|
||||
@ -284,6 +284,23 @@ public class FaceRecognition : DisposableObject
|
||||
return new FaceEncoding(matrix);
|
||||
}
|
||||
|
||||
public static FaceEncoding LoadBFaceEncoding(double[] encoding)
|
||||
{
|
||||
if (encoding is null)
|
||||
throw new NullReferenceException(nameof(encoding));
|
||||
if (encoding.Length != 512)
|
||||
{
|
||||
string message = $"{nameof(encoding)}.{nameof(encoding.Length)} must be 512.";
|
||||
throw new ArgumentOutOfRangeException(message);
|
||||
}
|
||||
#pragma warning disable
|
||||
Matrix<double>? matrix = Matrix<double>.CreateTemplateParameterizeMatrix(0, 1);
|
||||
#pragma warning restore
|
||||
matrix.SetSize(512);
|
||||
matrix.Assign(encoding);
|
||||
return new FaceEncoding(matrix);
|
||||
}
|
||||
|
||||
public static Image LoadImageFile(string file, Mode mode = Mode.Rgb)
|
||||
{
|
||||
if (!File.Exists(file))
|
||||
|
Reference in New Issue
Block a user