Auto Labeler DL

1 개요

Source
Result
Source Result
Fig. AutoLabelerDL 동작 수행 결과

2 API

3 예제 코드:


CResult res;
CFLImage fliSourceImage;

bool bOverwrite = true;
bool bBatchProcessing = true;
CAutoLabelerDL::ELabelOptions eLabelOption = CAutoLabelerDL::ELabelOptions_RegionType_Contour;
float f32MinimumArea = 500.00f;
float f32MaximumArea = 500000.00f;
float f32MinimumConfidenceScore = 0.5f;

CFLString<wchar_t> flsModelFilePath = L"../../ExampleImages/SemanticSegmentation/SemanticSegmentation.flss";

if(IsFail(res = fliSourceImage.Load(L"../../ExampleImages/SemanticSegmentation/Validation.flif")))
	break;

CAutoLabelerDL autoLabelerDL;

autoLabelerDL.Load(flsModelFilePath);
autoLabelerDL.SetSourceImage(fliSourceImage);
autoLabelerDL.EnableOverwriting(bOverwrite);
autoLabelerDL.EnableBatchProcessing(bBatchProcessing);
autoLabelerDL.SetLabelOptions(eLabelOption);
autoLabelerDL.SetMinimumScore(f32MinimumConfidenceScore);
autoLabelerDL.SetMinimumArea(f32MinimumArea);
autoLabelerDL.SetMaximumArea(f32MaximumArea);
autoLabelerDL.Execute();

if(IsFail(res = autoLabelerDL.Execute()))
    break;

if(IsFail(res = fliSourceImage.Save(L"../../ExampleImages/SemanticSegmentation/AutoLabelResult.flif")))
	break;

CResult res = new CResult();
CFLImage fliSourceImage = new CFLImage();

bool bOverwrite = true;
bool bBatchProcessing = true;
CAutoLabelerDL.ELabelOptions eLabelOption = CAutoLabelerDL.ELabelOptions.RegionType_Contour;
float f32MinimumArea = 500.00f;
float f32MaximumArea = 500000.00f;
float f32MinimumConfidenceScore = 0.5f;

String flsModelFilePath = "../../ExampleImages/SemanticSegmentation/SemanticSegmentation.flss";

if((res = fliSourceImage.Load("../../ExampleImages/SemanticSegmentation/Validation.flif")).IsFail())
	break;

CAutoLabelerDL autoLabelerDL = new CAutoLabelerDL();

autoLabelerDL.Load(flsModelFilePath);
autoLabelerDL.SetSourceImage(ref fliSourceImage);
autoLabelerDL.EnableOverwriting(bOverwrite);
autoLabelerDL.EnableBatchProcessing(bBatchProcessing);
autoLabelerDL.SetLabelOptions(eLabelOption);
autoLabelerDL.SetMinimumScore(f32MinimumConfidenceScore);
autoLabelerDL.SetMinimumArea(f32MinimumArea);
autoLabelerDL.SetMaximumArea(f32MaximumArea);

if((res = autoLabelerDL.Execute()).IsFail())
	break;

if((res = fliSourceImage.Save("../../ExampleImages/SemanticSegmentation/AutoLabelResult.flif")).IsFail())
	break;
fliSourceImage = CFLImage()

bOverwrite = True
bBatchProcessing = True
eLabelOption = CAutoLabelerDL.ELabelOptions.RegionType_Contour
f32MinimumArea = 500.00
f32MaximumArea = 500000.00
f32MinimumConfidenceScore = 0.5

flsModelFilePath = "../../ExampleImages/SemanticSegmentation/SemanticSegmentation.flss"
fliSourceImage.Load("../../ExampleImages/SemanticSegmentation/Validation.flif")

autoLabelerDL = CAutoLabelerDL()

autoLabelerDL.Load(flsModelFilePath)
autoLabelerDL.SetSourceImage(fliSourceImage)
autoLabelerDL.EnableOverwriting(bOverwrite)
autoLabelerDL.EnableBatchProcessing(bBatchProcessing)
autoLabelerDL.SetLabelOptions(eLabelOption)
autoLabelerDL.SetMinimumScore(f32MinimumConfidenceScore)
autoLabelerDL.SetMinimumArea(f32MinimumArea)
autoLabelerDL.SetMaximumArea(f32MaximumArea)
autoLabelerDL.Execute()

fliSourceImage.Save("../../ExampleImages/SemanticSegmentation/AutoLabelResult.flif")
CResult res;

CFLString<wchar_t> flsModelFilePath = L"../../ExampleImages/SemanticSegmentation/SemanticSegmentation.flss";
CFLImage fliSourceImage;
CSemanticSegmentationDL semanticSegmentationDL;

bool bOverwrite = true;
bool bBatchProcessing = false;
CAutoLabelerDL::ELabelOptions eLabelOption = CAutoLabelerDL::ELabelOptions_RegionType_Contour;
float f32MinimumArea = 500.00f;
float f32MaximumArea = 500000.00f;
float f32MinimumConfidenceScore = 0.5f;

if(IsFail(res = semanticSegmentationDL.Load(flsModelFilePath)))
	break;
if(IsFail(res = fliSourceImage.Load(L"../../ExampleImages/SemanticSegmentation/Validation.flif")))
	break;

CAutoLabelerDL autoLabelerDL;

autoLabelerDL.Load(&semanticSegmentationDL);
autoLabelerDL.SetSourceImage(fliSourceImage);
autoLabelerDL.EnableOverwriting(bOverwrite);
autoLabelerDL.EnableBatchProcessing(bBatchProcessing);
autoLabelerDL.SetLabelOptions(eLabelOption);
autoLabelerDL.SetMinimumScore(f32MinimumConfidenceScore);
autoLabelerDL.SetMinimumArea(f32MinimumArea);
autoLabelerDL.SetMaximumArea(f32MaximumArea);
autoLabelerDL.Execute();

if(IsFail(res = autoLabelerDL.Execute()))
    break;

if(IsFail(res = fliSourceImage.Save(L"../../ExampleImages/SemanticSegmentation/AutoLabelResult.flif")))
	break;
CResult res = new CResult();

String flsModelFilePath = "../../ExampleImages/SemanticSegmentation/SemanticSegmentation.flss";
CFLImage fliSourceImage = new CFLImage();
CSemanticSegmentationDL semanticSegmentationDL = new CSemanticSegmentationDL();

bool bOverwrite = true;
bool bBatchProcessing = false;
CAutoLabelerDL.ELabelOptions eLabelOption = CAutoLabelerDL.ELabelOptions.RegionType_Contour;
float f32MinimumArea = 500.00f;
float f32MaximumArea = 500000.00f;
float f32MinimumConfidenceScore = 0.5f;

if((res = semanticSegmentationDL.Load(flsModelFilePath)).IsFail())
	break;
if((res = fliSourceImage.Load("../../ExampleImages/SemanticSegmentation/Validation.flif")).IsFail())
	break;

CAutoLabelerDL autoLabelerDL = new CAutoLabelerDL();

autoLabelerDL.Load(ref semanticSegmentationDL);
autoLabelerDL.SetSourceImage(ref fliSourceImage);
autoLabelerDL.EnableOverwriting(bOverwrite);
autoLabelerDL.EnableBatchProcessing(bBatchProcessing);
autoLabelerDL.SetLabelOptions(eLabelOption);
autoLabelerDL.SetMinimumScore(f32MinimumConfidenceScore);
autoLabelerDL.SetMinimumArea(f32MinimumArea);
autoLabelerDL.SetMaximumArea(f32MaximumArea);
autoLabelerDL.Execute();

if((res = autoLabelerDL.Execute()).IsFail())
  break;

if((res = fliSourceImage.Save("../../ExampleImages/SemanticSegmentation/AutoLabelResult.flif")).IsFail())
	break;

flsModelFilePath = "../../ExampleImages/SemanticSegmentation/SemanticSegmentation.flss"
fliSourceImage = CFLImage()
semanticSegmentationDL = CSemanticSegmentationDL()

bOverwrite = True
bBatchProcessing = False
eLabelOption = CAutoLabelerDL.ELabelOptions.RegionType_Contour
f32MinimumArea = 500.00
f32MaximumArea = 500000.00
f32MinimumConfidenceScore = 0.5

res = semanticSegmentationDL.Load(flsModelFilePath)
res = fliSourceImage.Load("../../ExampleImages/SemanticSegmentation/Validation.flif")

autoLabelerDL = CAutoLabelerDL()

autoLabelerDL.Load(semanticSegmentationDL)
autoLabelerDL.SetSourceImage(fliSourceImage)
autoLabelerDL.EnableOverwriting(bOverwrite)
autoLabelerDL.EnableBatchProcessing(bBatchProcessing)
autoLabelerDL.SetLabelOptions(eLabelOption)
autoLabelerDL.SetMinimumScore(f32MinimumConfidenceScore)
autoLabelerDL.SetMinimumArea(f32MinimumArea)
autoLabelerDL.SetMaximumArea(f32MaximumArea)
autoLabelerDL.Execute()

autoLabelerDL.Execute()

fliSourceImage.Save("../../ExampleImages/SemanticSegmentation/AutoLabelResult.flif")
CResult res;

CFLString<wchar_t> flsModelFilePath = L"../../ExampleImages/SemanticSegmentation/InstanceSegmentation.flis";
CFLImage fliSourceImage;
CInstanceSegmentationDL instanceSegmentationDL;

bool bOverwrite = true;
bool bBatchProcessing = false;
CAutoLabelerDL::ELabelOptions eLabelOption = CAutoLabelerDL::ELabelOptions_RegionType_Contour;
float f32MinimumArea = 500.00f;
float f32MaximumArea = 500000.00f;
float f32MinimumConfidenceScore = 0.5f;

if(IsFail(res = instanceSegmentationDL.Load(flsModelFilePath)))
	break;

if(IsFail(res = fliSourceImage.Load(L"../../ExampleImages/SemanticSegmentation/Validation.flif")))
	break;

CAutoLabelerDL autoLabelerDL;

autoLabelerDL.Load(&instanceSegmentationDL);
autoLabelerDL.SetSourceImage(fliSourceImage);
autoLabelerDL.EnableOverwriting(bOverwrite);
autoLabelerDL.EnableBatchProcessing(bBatchProcessing);
autoLabelerDL.SetLabelOptions(eLabelOption);
autoLabelerDL.SetMinimumScore(f32MinimumConfidenceScore);
autoLabelerDL.SetMinimumArea(f32MinimumArea);
autoLabelerDL.SetMaximumArea(f32MaximumArea);
autoLabelerDL.Execute();

if(IsFail(res = autoLabelerDL.Execute()))
    break;

if(IsFail(res = fliSourceImage.Save(L"../../ExampleImages/SemanticSegmentation/AutoLabelResult.flif")))
	break;
CResult res = new CResult();

String flsModelFilePath = "../../ExampleImages/SemanticSegmentation/InstanceSegmentation.flis";
CFLImage fliSourceImage = new CFLImage();
CInstanceSegmentationDL instanceSegmentationDL = new CInstanceSegmentationDL();

bool bOverwrite = true;
bool bBatchProcessing = false;
CAutoLabelerDL.ELabelOptions eLabelOption = CAutoLabelerDL.ELabelOptions.RegionType_Contour;
float f32MinimumArea = 500.00f;
float f32MaximumArea = 500000.00f;
float f32MinimumConfidenceScore = 0.5f;

if((res = instanceSegmentationDL.Load(flsModelFilePath)).IsFail())
	break;

if((res = fliSourceImage.Load("../../ExampleImages/SemanticSegmentation/Validation.flif")).IsFail())
	break;

CAutoLabelerDL autoLabelerDL = new CAutoLabelerDL();

autoLabelerDL.Load(ref instanceSegmentationDL);
autoLabelerDL.SetSourceImage(ref fliSourceImage);
autoLabelerDL.EnableOverwriting(bOverwrite);
autoLabelerDL.EnableBatchProcessing(bBatchProcessing);
autoLabelerDL.SetLabelOptions(eLabelOption);
autoLabelerDL.SetMinimumScore(f32MinimumConfidenceScore);
autoLabelerDL.SetMinimumArea(f32MinimumArea);
autoLabelerDL.SetMaximumArea(f32MaximumArea);
autoLabelerDL.Execute();

if((res = autoLabelerDL.Execute()).IsFail())
  break;

if((res = fliSourceImage.Save("../../ExampleImages/SemanticSegmentation/AutoLabelResult.flif")).IsFail())
	break;
flsModelFilePath = "../../ExampleImages/SemanticSegmentation/InstanceSegmentation.flis"
fliSourceImage = CFLImage()
instanceSegmentationDL = CInstanceSegmentationDL()

bOverwrite = True
bBatchProcessing = False
eLabelOption = CAutoLabelerDL.ELabelOptions.RegionType_Contour
f32MinimumArea = 500.00
f32MaximumArea = 500000.00
f32MinimumConfidenceScore = 0.5

instanceSegmentationDL.Load(flsModelFilePath)
fliSourceImage.Load("../../ExampleImages/SemanticSegmentation/Validation.flif")

autoLabelerDL = CAutoLabelerDL()

autoLabelerDL.Load(instanceSegmentationDL)
autoLabelerDL.SetSourceImage(fliSourceImage)
autoLabelerDL.EnableOverwriting(bOverwrite)
autoLabelerDL.EnableBatchProcessing(bBatchProcessing)
autoLabelerDL.SetLabelOptions(eLabelOption)
autoLabelerDL.SetMinimumScore(f32MinimumConfidenceScore)
autoLabelerDL.SetMinimumArea(f32MinimumArea)
autoLabelerDL.SetMaximumArea(f32MaximumArea)
autoLabelerDL.Execute()

fliSourceImage.Save("../../ExampleImages/SemanticSegmentation/AutoLabelResult.flif")