1 write to _parent
Microsoft.ML.TorchSharp (1)
AutoFormerV2\ObjectDetectionTrainer.cs (1)
733
_parent
= parent;
19 references to _parent
Microsoft.ML.TorchSharp (19)
AutoFormerV2\ObjectDetectionTrainer.cs (19)
755
var keyType =
_parent
.LabelColumn.Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.KeyValues)?.Type as VectorDataViewType;
756
var getter = Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke(_makeLabelAnnotationGetter, this, keyType.ItemType.RawType,
_parent
.LabelColumn);
767
info[0] = new DataViewSchema.DetachedColumn(
_parent
.Options.PredictedLabelColumnName, new VectorDataViewType(new KeyDataViewType(typeof(uint),
_parent
.Options.NumberOfClasses)), labelBuilder.ToAnnotations());
769
info[1] = new DataViewSchema.DetachedColumn(
_parent
.Options.ScoreColumnName, new VectorDataViewType(NumberDataViewType.Single), meta.ToAnnotations());
771
info[2] = new DataViewSchema.DetachedColumn(
_parent
.Options.PredictedBoundingBoxColumnName, new VectorDataViewType(NumberDataViewType.Single));
808
getImage = input.GetGetter<MLImage>(input.Schema[
_parent
.Options.ImageColumnName]);
832
getImage = input.GetGetter<MLImage>(input.Schema[
_parent
.Options.ImageColumnName]);
856
getImage = input.GetGetter<MLImage>(input.Schema[
_parent
.Options.ImageColumnName]);
881
TensorCacher outputCacher = new TensorCacher(
_parent
.Options.NumberOfClasses);
883
_parent
.Model.eval();
905
var midTensor0 = torch.tensor(image.GetBGRPixels, device:
_parent
.Device);
921
var transMidTensor = torch.zeros(1, 3, image.Height + padH, image.Width + padW, device:
_parent
.Device);
923
var imageTensor = ObjectDetectionTrainer.Trainer.Normalize(transMidTensor,
_parent
.Device);
930
return
_parent
.Model.forward(inputTensor);
969
_parent
.Model.eval();
973
ImageUtils.Postprocess(imageTensor, pred, score, box, out outputCache.PredictedLabelsBuffer, out outputCache.ScoresBuffer, out outputCache.BoxBuffer,
_parent
.Options.ScoreThreshold,
_parent
.Options.IOUThreshold);
983
private protected override void SaveModel(ModelSaveContext ctx) =>
_parent
.SaveModel(ctx);