Example #1
0
        public List <int> Execute(List <AugmentableObjectSample> samples, string dmrfilepath)
        {
            string serialized   = PointCloudiaFormatSerializer.PointBoundingBoxAndMaxDimFormat(samples);
            string tempfilepath = Path.Combine(GConfig.TOOL_UNDERGROUND_FILTER_PATH, "temp.txt" + Guid.NewGuid().ToString());

            File.WriteAllText(tempfilepath, serialized);
            List <int> result = new UndergroundFilterDriver().Execute(dmrfilepath, tempfilepath);

            File.Delete(tempfilepath);
            return(result);
        }
Example #2
0
        public List <int> Execute(List <AugmentableObjectSample> samples)
        {
            string serialized   = PointCloudiaFormatSerializer.PointBoundingBoxAndMaxDimFormat(samples);
            string tempfilepath = Path.Combine(GConfig.TOOL_OVERLAP_COMPUTE_PATH, "temp.txt" + Guid.NewGuid().ToString());

            File.WriteAllText(tempfilepath, serialized);
            List <int> result = new OverlapFilterDriver().Execute(tempfilepath);

            File.Delete(tempfilepath);
            return(result);
        }
        public void ExecuteTest(string[] args)
        {
            // load up some augmentables in AugmentableSampleResultFormat
            string str = File.ReadAllText(source_file);
            List <AugmentableObjectSample> samples = PointCloudiaFormatDeserializer.AugmentableSampleResultFormat(str);
            string pbbmdf = PointCloudiaFormatSerializer.PointBoundingBoxAndMaxDimFormat(samples);

            File.WriteAllText(pbbmdf_save_file, pbbmdf);

            string pythonscriptsdir            = @"C:\Users\km\Desktop\playground\pycharmprojects\floating_object_segmentation_scripts\other\";
            string pbmdftolidar_path           = Path.Combine(pythonscriptsdir, "PBBMDF_to_lidar.py");
            string lidar_to_number_per_line    = Path.Combine(pythonscriptsdir, "lidar_to_number_per_line.py");
            string lidar_to_dummy_rbnn_results = Path.Combine(pythonscriptsdir, "lidar_to_dummy_rbnn_results.py");
            string merge_two_lidars            = Path.Combine(pythonscriptsdir, "merge_two_lidars.py");

            // use python script to transform to lidar format
            PowerShell.Execute($"python {pbmdftolidar_path} {dmrlidar} {pbbmdf_save_file} {Path.Combine(TEST_SUBSUBDIR, "lidar_pbbmdf")} 1");
            PowerShell.Execute($"python {merge_two_lidars} {dmrlidar} {Path.Combine(TEST_SUBSUBDIR, "lidar_pbbmdf")} {Path.Combine(TEST_SUBSUBDIR, "result.txt")}");
            PowerShell.Execute($"python {lidar_to_number_per_line} {Path.Combine(TEST_SUBSUBDIR, "result.txt")} {Path.Combine(TEST_SUBSUBDIR, "resultintensity.txt")} 0");
            PowerShell.Execute($"python {lidar_to_number_per_line} {Path.Combine(TEST_SUBSUBDIR, "result.txt")} {Path.Combine(TEST_SUBSUBDIR, "resultclass.txt")} 0");
            PowerShell.Execute($"python {lidar_to_dummy_rbnn_results} {Path.Combine(TEST_SUBSUBDIR, "result.txt")} {Path.Combine(TEST_SUBSUBDIR, "resultrbnn.txt")}");
        }