예제 #1
0
int main(int argc, char* argv[])
{
    int W = 2, NSS = 8;
    double base = 2.0;
    if (argc < 2)
    {
        fprintf(stderr, "usage: work/directory/\n");
        return -1;
    }

    srand((unsigned int)time(NULL));
    DataSetVOC voc2007(argv[1]);
    voc2007.loadAnnotations();

    Objectness objNess(voc2007, base, W, NSS);

    objNess.evaluateIJCV13();
}
예제 #2
0
파일: Main.cpp 프로젝트: yun-liu/BING
void RunObjectness(CStr &resName, double base, int W, int NSS, int numPerSz)
{
	srand((unsigned int)time(NULL));
	DataSetVOC voc2007("C:/WkDir/DetectionProposals/VOC2007/");
	voc2007.loadAnnotations();
	//voc2007.loadDataGenericOverCls();

	cout << "Dataset:'" << _S(voc2007.wkDir) << "' with " << voc2007.trainNum << " training and " << voc2007.testNum << " testing" << endl;
	cout << _S(resName) << " Base = " << base << ", W = " << W << ", NSS = " << NSS << ", perSz = " << numPerSz << endl;

	Objectness objNess(voc2007, base, W, NSS);

	vector<vector<Vec4i>> boxes;
	//objNess.getObjBndBoxesForTests(boxes, 250);
	objNess.getObjBndBoxesForTestFast(boxes, numPerSz);
	//objNess.getRandomBoxes(boxes);
	//objNess.evaluatePerClassRecall(boxes, resName, 2000);
	//objNess.illuTestReults(boxes);
}
예제 #3
0
파일: Main.cpp 프로젝트: 20083017/CmCode
void RunObjectness(CStr &resName, double base, double intUionThr, int W, int NSS, int numPerSz)
{
	srand((unsigned int)time(NULL));
	//DataSetVOC voc2007("D:/WkDir/DetectionProposals/VOC2007/");
	DataSetVOC voc2007("./VOC2007/");
	voc2007.loadAnnotations();
	//voc2007.loadDataGenericOverCls();

	printf("Dataset:`%s' with %d training and %d testing\n", _S(voc2007.wkDir), voc2007.trainNum, voc2007.testNum);
	printf("%s Base = %g, intUionThr = %g, W = %d, NSS = %d, perSz = %d\n", _S(resName), base, intUionThr, W, NSS, numPerSz);
	
	Objectness objNess(voc2007, base, intUionThr, W, NSS);

	vector<vector<Vec4i>> boxesTests;
	//objNess.getObjBndBoxesForTests(boxesTests, 250);
	objNess.getObjBndBoxesForTestsFast(boxesTests, numPerSz);
	//objNess.getRandomBoxes(boxesTests);
	//objNess.evaluatePerClassRecall(boxesTests, resName, 1000);
	//objNess.illuTestReults(boxesTests);
}
예제 #4
0
bool GenericObjectDetector::InitBingObjectness()
{
	// set dataset for training and testing
	DataSetVOC voc2007("e:\\VOC2007\\");
	//voc2007.loadAnnotations();

	// params
	double base = 2;
	int W = 8;
	int NSS = 2;
	int numPerSz = 130;

	bingObjectness = new Objectness(voc2007, base, W, NSS);
	if( bingObjectness->loadTrainedModel() != 1 )
	{
		cerr<<"Fail to load all bing model."<<endl;
		return false;
	}

	isBingInitialized = true;

	return true;
}