예제 #1
0
        private void LoadBoundingBox(string file)
        {
            _imgAnnotateBoundingBoxList.Clear();
            pbImage.Controls.Clear();
            var width  = _image.Width;
            var height = _image.Height;

            if (!File.Exists(file))
            {
                return;
            }
            var list = IoUtils.File2List(file);

            foreach (var boxInfo in list)
            {
                var arr       = boxInfo.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries);
                var classId   = arr[0].ToInt();
                var centerX   = (arr[1].ToDouble() * width).ToRoundInt();
                var centerY   = (arr[2].ToDouble() * height).ToRoundInt();
                var boxWidth  = (arr[3].ToDouble() * width).ToRoundInt();
                var boxHeight = (arr[4].ToDouble() * height).ToRoundInt();
                var left      = centerX - boxWidth / 2;
                var top       = centerY - boxHeight / 2;
                var dr        = new DragableRectangle()
                {
                    Parent = pbImage, Left = left, Top = top, Width = boxWidth, Height = boxHeight, ClassId = classId
                };
                dr.OnRectDoubleClick += Dr_OnRectDoubleClick;
                _imgAnnotateBoundingBoxList.Add(dr);
            }
        }
        public FrmSetBoundingClassId()
        {
            InitializeComponent();
            var list = IoUtils.File2List(YOLOv3Files.ClassesNameFile);

            cmbClassesName.Items.Clear();
            list.ForEach(n => cmbClassesName.Items.Add(n));
        }
예제 #3
0
        private void LoadNames()
        {
            var fileName = YOLOv3Files.ClassesNameFile;

            if (!File.Exists(fileName))
            {
                return;
            }
            var list = IoUtils.File2List(fileName);

            foreach (var v in list)
            {
                lbNames.Items.Add(v);
            }
        }
예제 #4
0
        private void btnGenDarknetDataFile_Click(object sender, EventArgs e)
        {
            var nameList = IoUtils.File2List(YOLOv3Files.ClassesNameFile);
            var dataList = new List <string>();

            dataList.Add($"classes = {nameList.Count}");
            dataList.Add($"train = {tbYOLOv3Detector.Text}/{Path.GetFileName(YOLOv3Files.TrainSampleFile)}");
            dataList.Add($"valid = {tbYOLOv3Detector.Text}/{Path.GetFileName(YOLOv3Files.TestSampleFile)}");
            dataList.Add($"names = {tbYOLOv3Detector.Text}/{Path.GetFileName(YOLOv3Files.ClassesNameFile)}");
            dataList.Add($"backup =  {tbYOLOv3Detector.Text}/");
            var backupPath = Path.Combine(Application.StartupPath, tbYOLOv3Detector.Text);

            if (!Directory.Exists(backupPath))
            {
                Directory.CreateDirectory(backupPath);
            }
            IoUtils.List2File(YOLOv3Files.DarknetDataFile, dataList);
        }
예제 #5
0
        private void btnGenCfgFile_Click(object sender, EventArgs e)
        {
            var nameList   = IoUtils.File2List(YOLOv3Files.ClassesNameFile);
            var classesCnt = nameList.Count;

            _cfgList.Clear();
            tbLog.Clear();
            #region 生成配置内容
            AppendCfg("");
            AppendCfg("[net]");
            AppendCfg("# Testing");
            AppendCfg("#batch=1");
            AppendCfg("#subdivisions=1");
            AppendCfg("# Training");
            AppendCfg("batch=32");
            AppendCfg("subdivisions=32");
            AppendCfg("width=416");
            AppendCfg("height=416");
            AppendCfg("channels=3");
            AppendCfg("momentum=0.9");
            AppendCfg("decay=0.0005");
            AppendCfg("angle=0");
            AppendCfg("saturation = 1.5");
            AppendCfg("exposure = 1.5");
            AppendCfg("hue=.1");
            AppendCfg("");
            AppendCfg("learning_rate=0.001");
            AppendCfg("burn_in=1000");
            var maxBatches = Math.Max(classesCnt * 2000, 5000);
            AppendCfg($"max_batches = {maxBatches}");
            AppendCfg("policy=steps");
            AppendCfg($"steps={(maxBatches * 0.8).ToInt()},{(maxBatches * 0.9).ToInt()}");
            AppendCfg("scales=.1,.1");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=32");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("# Downsample");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=64");
            AppendCfg("size=3");
            AppendCfg("stride=2");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=32");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=64");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("# Downsample");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=3");
            AppendCfg("stride=2");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=64");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=64");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("# Downsample");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=3");
            AppendCfg("stride=2");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("# Downsample");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=3");
            AppendCfg("stride=2");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("# Downsample");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=1024");
            AppendCfg("size=3");
            AppendCfg("stride=2");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=1024");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=1024");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=1024");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=1024");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[shortcut]");
            AppendCfg("from=-3");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("######################");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("filters=1024");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("filters=1024");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=512");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("filters=1024");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg($"filters={(classesCnt + 5) * 3}");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("[yolo]");
            AppendCfg("mask = 6,7,8");
            AppendCfg("anchors = 10,13,  16,30,  33,23,  30,61,  62,45,  59,119,  116,90,  156,198,  373,326");
            AppendCfg($"classes={classesCnt}");
            AppendCfg("num=9");
            AppendCfg("jitter=.3");
            AppendCfg("ignore_thresh = .7");
            AppendCfg("truth_thresh = 1");
            AppendCfg("random=1");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("[route]");
            AppendCfg("layers = -4");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[upsample]");
            AppendCfg("stride=2");
            AppendCfg("");
            AppendCfg("[route]");
            AppendCfg("layers = -1, 61");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("filters=512");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("filters=512");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=256");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("filters=512");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg($"filters={(classesCnt + 5) * 3}");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("[yolo]");
            AppendCfg("mask = 3,4,5");
            AppendCfg("anchors = 10,13,  16,30,  33,23,  30,61,  62,45,  59,119,  116,90,  156,198,  373,326");
            AppendCfg($"classes={classesCnt}");
            AppendCfg("num=9");
            AppendCfg("jitter=.3");
            AppendCfg("ignore_thresh = .7");
            AppendCfg("truth_thresh = 1");
            AppendCfg("random=1");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("[route]");
            AppendCfg("layers = -4");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[upsample]");
            AppendCfg("stride=2");
            AppendCfg("");
            AppendCfg("[route]");
            AppendCfg("layers = -1, 36");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("filters=256");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("filters=256");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("filters=128");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("batch_normalize=1");
            AppendCfg("size=3");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg("filters=256");
            AppendCfg("activation=leaky");
            AppendCfg("");
            AppendCfg("[convolutional]");
            AppendCfg("size=1");
            AppendCfg("stride=1");
            AppendCfg("pad=1");
            AppendCfg($"filters={(classesCnt + 5) * 3}");
            AppendCfg("activation=linear");
            AppendCfg("");
            AppendCfg("");
            AppendCfg("[yolo]");
            AppendCfg("mask = 0,1,2");
            AppendCfg("anchors = 10,13,  16,30,  33,23,  30,61,  62,45,  59,119,  116,90,  156,198,  373,326");
            AppendCfg($"classes={classesCnt}");
            AppendCfg("num=9");
            AppendCfg("jitter=.3");
            AppendCfg("ignore_thresh = .7");
            AppendCfg("truth_thresh = 1");
            AppendCfg("random=1");
            #endregion
            IoUtils.List2File(YOLOv3Files.ConfigFile, _cfgList);
        }