public static void TestAggregateWithParameterVaidateKITTIResult() { List<string> guids = new List<string>() { ////KITTI set "3609af9c-e734-41dc-997c-94c060a1f63d", "5f14ecaa-1c4c-41d6-ad05-6ee0929e494e", "8fbc6ca1-e6c0-4720-93a3-1d49aa873a65", "d6f1c3ee-cd59-4197-b40a-0f45512596eb", //misc //"53d3aedc-7141-4951-a7fb-4beea9dc0d0b", }; KITTIDetectionResultValidation validate = new KITTIDetectionResultValidation(); //validate.ValidateSatyamKITTIDetectionAggregationResultByGUID("dca00b33-9336-4146-be3a-cc0e20fb3e8d"); //validate.ValidateSatyamKITTIDetectionAggregationResultByGUID("b4ec157d-f8ac-4c46-9b81-f99869643e66"); //KITTI major launch //validate.ValidateSatyamKITTIDetectionAggregationResultByGUID(guids); //validate.AggregateWithParameterAndValidateSatyamKITTIDetectionResultByGUID(guids, new Dictionary<string, double>() { { "car", 0.5 }, { "pedestrian", 0.5}, { "cyclist", 0.5 }, { "default", 0.5 } }, overwrite: true); // save aggregated images //validate.AggregateWithParameterAndValidateSatyamKITTIDetectionResultByGUID(guids, TaskConstants.IoUTreshold, true, overwrite: true); // prepare data for training string outputDirectory = DirectoryConstants.defaultTempDirectory + "\\KITTIDetectionResultDataForTraining\\"; validate.AggregateWithParameterAndValidateSatyamKITTIDetectionResultByGUID(guids, TaskConstants.IoUTreshold, false, true, outputDirectory, overwrite: true); //validate.AggregateWithParameterAndValidateSatyamKITTIDetectionResultByGUID(guids, // new Dictionary<string, double>() { { "car", 0.3 }, { "pedestrian", 0.3 }, { "cyclist", 0.3 }, { "default", 0.3 } }, // false, false, null, 25,1,0.3,5,12,0.6,0.9,15); }
public static void TestFilterGroundTruthFile() { string outputDir = DirectoryConstants.defaultTempDirectory + "filteredKITTIGroundTruth\\"; string outputDir_Seattle = outputDir + "SeattleLive-5-WestLake-NS\\"; string outputDir_Stewart = outputDir + "1-Stewart-NS\\"; string outputDir_BellevueNE = outputDir + "Bellevue-148th-NE29th\\"; string outputDir_BellevueMain = outputDir + "Bellevue-148th-Main\\"; string inputDir = @"C:\research\dataset\LongDuration\"; string inputDir_Seattle = inputDir + "SeattleLive-5-WestLake-NS\\"; string inputDir_Stewart = inputDir + "1-Stewart-NS\\"; string inputDir_BellevueNE = inputDir + "Bellevue-148th-NE29th\\"; string inputDir_BellevueMain = inputDir + "Bellevue-148th-Main\\"; List<string> inputs = new List<string>() { inputDir_BellevueNE, inputDir_BellevueMain, inputDir_Seattle, inputDir_Stewart, }; List<string> outputs = new List<string>() { outputDir_BellevueNE, outputDir_BellevueMain, outputDir_Seattle, outputDir_Stewart, }; for (int i = 0; i < inputs.Count; i++) { string[] subdirs = Directory.GetDirectories(inputs[i] + "labels\\"); foreach (string subdir in subdirs) { int omitted = 0; string[] files = Directory.GetFiles(subdir); if (files.Length == 0) { string [] reward = Directory.GetDirectories(subdir); files = Directory.GetFiles(reward[0]); } string groupName = URIUtilities.localDirectoryNameFromDirectory(subdir); foreach (string file in files) { int tmp; KITTIDetectionResultValidation.FilterGroundTruthFile(file, outputs[i] + groupName, out tmp); omitted += tmp; } Console.WriteLine("{0}: omitted {1}", subdir, omitted); } } }
public static void TestGetKITTIDetectionGroundTruthStatistics() { KITTIDetectionResultValidation validate = new KITTIDetectionResultValidation(); validate.CleanGroundTruthAndGetStatistics(); //validate.CleanGroundTruthAndGetStatistics(@"C:\research\dataset\KITTI\Detection\10img\image_2", @"C:\research\dataset\KITTI\Detection\10img\label_2"); }
public static void TestParamSweep() { List<string> guids = new List<string>() { ////KITTI set //"3609af9c-e734-41dc-997c-94c060a1f63d", //"5f14ecaa-1c4c-41d6-ad05-6ee0929e494e", //"8fbc6ca1-e6c0-4720-93a3-1d49aa873a65", //"d6f1c3ee-cd59-4197-b40a-0f45512596eb", //misc //"53d3aedc-7141-4951-a7fb-4beea9dc0d0b", //"2c239102-e38f-4f0e-b639-6fae05250475", //detection KITTI 10 "aefd12fc-42ed-4ec5-8c9a-6c41703a843f", //revision KITTI 10 }; KITTIDetectionResultValidation validate = new KITTIDetectionResultValidation(); //string outputDirectory = DirectoryConstants.defaultTempDirectory + "\\KITTIDetectionResultDataForTraining\\"; /////////////////////////// param sweep //for (int min = 2; min <= 10; min++) //{ // for (int Deviation = 5; Deviation < 21; Deviation += 5) // { // for (double coverage = 0.5; coverage < 1; coverage += 0.1) // { // validate.AggregateWithParameterAndValidateSatyamKITTIDetectionResultByGUID(guids, // new Dictionary<string, double>() { { "car", 0.3 }, { "pedestrian", 0.3 }, { "cyclist", 0.3 }, { "default", 0.3 } }, // //new Dictionary<string, double>() { { "car", 0.5 }, { "pedestrian", 0.5 }, { "cyclist", 0.5 }, { "default", 0.5 } }, // false, false, null, 25, 1, 0.3, min, 20, 0.6, coverage, Deviation, overwrite: true, approvalAnalysis:true); // } // } //} //param sweep min, to compare reivision with no revision template, setting coverage to 0, fixing deviation to 15pixel, not very sensitive anyway for (int min = 2; min <= 10; min++) { validate.AggregateWithParameterAndValidateSatyamKITTIDetectionResultByGUID(guids, new Dictionary<string, double>() { { "car", 0.3 }, { "pedestrian", 0.3 }, { "cyclist", 0.3 }, { "default", 0.3 } }, //new Dictionary<string, double>() { { "car", 0.5 }, { "pedestrian", 0.5 }, { "cyclist", 0.5 }, { "default", 0.5 } }, MinResults: min, overwrite: true); } //// param sweep max, produce the best effort aggregation, to compare reivision with no revision template, setting coverage to 0, fixing deviation to 15pixel, not very sensitive anyway //for (int min = 2; min <= 4; min++) //{ // for (int max = 2; max <= 8; max++) // { // validate.AggregateWithParameterAndValidateSatyamKITTIDetectionResultByGUID(guids, // new Dictionary<string, double>() { { "car", 0.3 }, { "pedestrian", 0.3 }, { "cyclist", 0.3 }, { "default", 0.3 } }, // //new Dictionary<string, double>() { { "car", 0.5 }, { "pedestrian", 0.5 }, { "cyclist", 0.5 }, { "default", 0.5 } }, // MinResults: min, MaxResults: max, overwrite: true); // } //} //for (int max = 5; max<21;max += 5) //{ // validate.AggregateWithParameterAndValidateSatyamKITTIDetectionResultByGUID(guids, // new Dictionary<string, double>() { { "car", 0.3 }, { "pedestrian", 0.3 }, { "cyclist", 0.3 }, { "default", 0.3 } }, // //new Dictionary<string, double>() { { "car", 0.5 }, { "pedestrian", 0.5 }, { "cyclist", 0.5 }, { "default", 0.5 } }, // MaxResults:max); //} //List<Dictionary<string, double>> IoUTresholds = new List<Dictionary<string, double>>(); //IoUTresholds.Add(new Dictionary<string, double>() { { "car", 0.4 }, { "pedestrian", 0.5 }, { "cyclist", 0.5 }, { "default", 0.5 } }); //IoUTresholds.Add(new Dictionary<string, double>() { { "car", 0.5 }, { "pedestrian", 0.5 }, { "cyclist", 0.5 }, { "default", 0.5 } }); //IoUTresholds.Add(new Dictionary<string, double>() { { "car", 0.6 }, { "pedestrian", 0.5 }, { "cyclist", 0.5 }, { "default", 0.5 } }); //IoUTresholds.Add(new Dictionary<string, double>() { { "car", 0.7 }, { "pedestrian", 0.5 }, { "cyclist", 0.5 }, { "default", 0.5 } }); ////MinHeight iou //foreach(Dictionary<string, double> IoUThreshold in IoUTresholds) //{ // for (int MinHeight = 10; MinHeight < 50; MinHeight += 5) // { // validate.AggregateWithParameterAndValidateSatyamKITTIDetectionResultByGUID(guids, IoUThreshold, false, MinHeight); // } //} //for (int Deviation = 5;Deviation < 21;Deviation += 5) //{ // for (int MinHeight = 10; MinHeight < 50; MinHeight += 5) // { // validate.AggregateWithParameterAndValidateSatyamKITTIDetectionResultByGUID(guids, TaskConstants.IoUTreshold, false, MinHeight, DeviationPixelThreshold:Deviation); // } //} //for (double coverage = 0.5; coverage < 1; coverage += 0.1) //{ // validate.AggregateWithParameterAndValidateSatyamKITTIDetectionResultByGUID(guids, TaskConstants.IoUTreshold, false, ObjectsCoverageThreshold:coverage); //} summarize(guids[0]); }