MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.data.ImageTransforms< T > Class Template Reference

The ImageTransforms class provides several useful image transformation function used with SSD. More...

Public Member Functions

 ImageTransforms (CudaDnn< T > cuda, Log log, CryptoRandom random)
 The constructor. More...
 
NormalizedBBox UpdateBBoxByResizePolicy (ResizeParameter p, int nOldWidth, int nOldHeight, NormalizedBBox bbox1)
 Update the BBox size based on the Resize policy. More...
 
void InferNewSize (ResizeParameter p, int nOldWidth, int nOldHeight, out int nNewWidth, out int nNewHeight)
 Infer the new shape based on the resize policy. More...
 
SimpleDatum ApplyDistort (SimpleDatum sd, DistortionParameter p)
 The ApplyDistort method applies the distortion policy to the simple datum. More...
 
SimpleDatum ApplyDistortEx (SimpleDatum sd, DistortionParameter p)
 The ApplyDistortEx method applies the distortion policy to the simple datum. More...
 
SimpleDatum ApplyNoise (SimpleDatum sd, NoiseParameter p)
 The ApplyNoise method applies the noise policy to the SimpleDatum. More...
 
SimpleDatum ApplyResize (SimpleDatum sd, ResizeParameter p)
 The ApplyResize method resizes the SimpleDatum containing an image to a newly resized image as specified by the resize parameter. More...
 

Detailed Description

The ImageTransforms class provides several useful image transformation function used with SSD.

See also
SSD: Single Shot MultiBox Detector by Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, Alexander C. Berg, 2016.
GitHub: SSD: Single Shot MultiBox Detector, by weiliu89/caffe, 2016
Template Parameters
TSpecifies the base type float or double. Using float is recommended to conserve GPU memory.

Definition at line 22 of file ImageTransforms.cs.

Constructor & Destructor Documentation

◆ ImageTransforms()

MyCaffe.data.ImageTransforms< T >.ImageTransforms ( CudaDnn< T >  cuda,
Log  log,
CryptoRandom  random 
)

The constructor.

Parameters
cudaSpecifies the CudaDnn instance used to communidate with Cuda.
logSpecifies the Log for output.
randomSpecifies the random number generator.

Definition at line 34 of file ImageTransforms.cs.

Member Function Documentation

◆ ApplyDistort()

The ApplyDistort method applies the distortion policy to the simple datum.

Parameters
sdSpecifies the SimpleDatum to distort.
pSpecifies the distortion parameters that define the distortion policy.
Returns
The distorted SimpleDatum is returned.

Definition at line 402 of file ImageTransforms.cs.

◆ ApplyDistortEx()

The ApplyDistortEx method applies the distortion policy to the simple datum.

Parameters
sdSpecifies the SimpleDatum to distort.
pSpecifies the distortion parameters that define the distortion policy.
Returns
The distorted SimpleDatum is returned.

Definition at line 426 of file ImageTransforms.cs.

◆ ApplyNoise()

The ApplyNoise method applies the noise policy to the SimpleDatum.

Parameters
sdSpecifies the SimpleDatum for which noise is to be added.
pSpecifies the NoiseParameter that defines the noise policy.

NOTE: This method is not yet complete.

Definition at line 446 of file ImageTransforms.cs.

◆ ApplyResize()

The ApplyResize method resizes the SimpleDatum containing an image to a newly resized image as specified by the resize parameter.

Parameters
sdSpecifies the SimpleDatum to resize - must contain a 3 channel image.
pSpecifies the resize parameter to apply.
Returns
The newly resized SimpleDatum is returned.

Definition at line 458 of file ImageTransforms.cs.

◆ InferNewSize()

void MyCaffe.data.ImageTransforms< T >.InferNewSize ( ResizeParameter  p,
int  nOldWidth,
int  nOldHeight,
out int  nNewWidth,
out int  nNewHeight 
)

Infer the new shape based on the resize policy.

Parameters
pSpecifies the ResizeParameter with the resize policy.
nOldWidthSpecifies the old width.
nOldHeightSpecifies the old height.
nNewWidthSpecifies the new 'inferred' width.
nNewHeightSpecifies the new 'inferred' width.

Definition at line 128 of file ImageTransforms.cs.

◆ UpdateBBoxByResizePolicy()

NormalizedBBox MyCaffe.data.ImageTransforms< T >.UpdateBBoxByResizePolicy ( ResizeParameter  p,
int  nOldWidth,
int  nOldHeight,
NormalizedBBox  bbox1 
)

Update the BBox size based on the Resize policy.

Parameters
pSpecifies the ResizeParameter with the resize policy.
nOldWidthSpecifies the old width.
nOldHeightSpecifies the old height.
bbox1Specifies the BBox to update.
Returns
The update NormalizedBBox is returned.

Definition at line 49 of file ImageTransforms.cs.


The documentation for this class was generated from the following file: