private unsafe List <YoloResult> Detect11(Mat mat, float thresh = 0.2f) { BoundingBox11 *elems; int elemsSize; switch (_instanceId) { default: case 0: Wrapper0.Detect(mat.DataPointer, mat.Rows, mat.Cols, thresh, false, out elems, out elemsSize); break; case 1: Wrapper1.Detect(mat.DataPointer, mat.Rows, mat.Cols, thresh, false, out elems, out elemsSize); break; case 2: Wrapper2.Detect(mat.DataPointer, mat.Rows, mat.Cols, thresh, false, out elems, out elemsSize); break; case 3: Wrapper3.Detect(mat.DataPointer, mat.Rows, mat.Cols, thresh, false, out elems, out elemsSize); break; } return(GetResults(elems, elemsSize)); }
public Yolo(string cfgFile, string weightFile, int gpuId, int instanceId, int cudaVersion) { _instanceId = instanceId; _cudaVersion = cudaVersion; switch (_instanceId) { default: case 0: Wrapper0.Init(cfgFile, weightFile, gpuId); break; case 1: Wrapper1.Init(cfgFile, weightFile, gpuId); break; case 2: Wrapper2.Init(cfgFile, weightFile, gpuId); break; case 3: Wrapper3.Init(cfgFile, weightFile, gpuId); break; } }
public void Dispose() { switch (_instanceId) { default: case 0: Wrapper0.Close(); break; case 1: Wrapper1.Close(); break; case 2: Wrapper2.Close(); break; case 3: Wrapper3.Close(); break; } }