Rename
editorconfig
This commit is contained in:
@ -12,7 +12,7 @@ internal sealed class CnnFaceDetectionModelV1
|
||||
public static IEnumerable<MModRect> Detect(LossMmod net, Image image, int upsampleNumTimes)
|
||||
{
|
||||
using PyramidDown? pyr = new(2);
|
||||
List<MModRect>? rects = new();
|
||||
List<MModRect>? rects = [];
|
||||
|
||||
// Copy the data into dlib based objects
|
||||
using Matrix<RgbPixel>? matrix = new();
|
||||
@ -52,8 +52,8 @@ internal sealed class CnnFaceDetectionModelV1
|
||||
|
||||
public static IEnumerable<IEnumerable<MModRect>> DetectMulti(LossMmod net, IEnumerable<Image> images, int upsampleNumTimes, int batchSize = 128)
|
||||
{
|
||||
List<Matrix<RgbPixel>>? destImages = new();
|
||||
List<IEnumerable<MModRect>>? allRects = new();
|
||||
List<Matrix<RgbPixel>>? destImages = [];
|
||||
List<IEnumerable<MModRect>>? allRects = [];
|
||||
|
||||
try
|
||||
{
|
||||
@ -86,7 +86,7 @@ internal sealed class CnnFaceDetectionModelV1
|
||||
OutputLabels<IEnumerable<MModRect>>? dets = net.Operator(destImages, (ulong)batchSize);
|
||||
foreach (IEnumerable<MModRect>? det in dets)
|
||||
{
|
||||
List<MModRect>? rects = new();
|
||||
List<MModRect>? rects = [];
|
||||
foreach (MModRect? d in det)
|
||||
{
|
||||
DRectangle drect = pyr.RectDown(new DRectangle(d.Rect), (uint)upsampleNumTimes);
|
||||
|
Reference in New Issue
Block a user