AlexeyAB
2018-06-13 6d44529cf93211c319813c90e0c1adb34426abe5
Minor fix
3 files modified
18 ■■■■■ changed files
README.md 3 ●●●● patch | view | raw | blame | history
src/detector.c 3 ●●●●● patch | view | raw | blame | history
src/utils.c 12 ●●●● patch | view | raw | blame | history
README.md
@@ -100,7 +100,6 @@
* Remeber to put data/9k.tree and data/coco9k.map under the same folder of your app if you use the cpp api to build an app
* To process a list of images `data/train.txt` and save results of detection to `result.txt` use:                             
    `darknet.exe detector test data/voc.data yolo-voc.cfg yolo-voc.weights -dont_show -ext_output < data/train.txt > result.txt`
    You can comment this line so that each image does not require pressing the button ESC: https://github.com/AlexeyAB/darknet/blob/6ccb41808caf753feea58ca9df79d6367dedc434/src/detector.c#L509
##### For using network video-camera mjpeg-stream with any Android smartphone:
@@ -428,7 +427,7 @@
  * for training for small objects - set `layers = -1, 11` instead of https://github.com/AlexeyAB/darknet/blob/6390a5a2ab61a0bdf6f1a9a6b4a739c16b36e0d7/cfg/yolov3.cfg#L720
      and set `stride=4` instead of https://github.com/AlexeyAB/darknet/blob/6390a5a2ab61a0bdf6f1a9a6b4a739c16b36e0d7/cfg/yolov3.cfg#L717
  
  * General rule - you should keep relative size of objects in the Training and Testing datasets roughly the same:
  * General rule - your training dataset should include such a set of relative sizes of objects that you want to detect - differing by no more than 2 times:
    * `train_network_width * train_obj_width / train_image_width ~= detection_network_width * detection_obj_width / detection_image_width`
    * `train_network_height * train_obj_height / train_image_height ~= detection_network_height * detection_obj_height / detection_image_height`
src/detector.c
@@ -65,6 +65,9 @@
        printf("\n Error: You set incorrect value batch=1 for Training! You should set batch=64 subdivision=64 \n");
        getchar();
    }
    else if ((net.batch * net.subdivisions) < 64) {
            printf("\n Warning: You set batch= lower than 64! It is recommended to set batch=64 subdivision=64 \n");
    }
    int imgs = net.batch * net.subdivisions * ngpus;
    printf("Learning Rate: %g, Momentum: %g, Decay: %g\n", net.learning_rate, net.momentum, net.decay);
src/utils.c
@@ -206,12 +206,12 @@
}
void replace_image_to_label(char *input_path, char *output_path) {
    //find_replace(input_path, "images", "labels", output_path);    // COCO
    find_replace(input_path, "images/train2014/", "labels/train2014/", output_path);    // COCO
    find_replace(output_path, "images/val2014/", "labels/val2014/", output_path);       // COCO
    //find_replace(output_path, "JPEGImages", "labels", output_path);   // PascalVOC
    find_replace(output_path, "VOC2007/JPEGImages", "VOC2007/labels", output_path);     // PascalVOC
    find_replace(output_path, "VOC2012/JPEGImages", "VOC2012/labels", output_path);     // PascalVOC
    //find_replace(input_path, "/images/", "/labels/", output_path);    // COCO
    find_replace(input_path, "/images/train2014/", "/labels/train2014/", output_path);  // COCO
    find_replace(output_path, "/images/val2014/", "/labels/val2014/", output_path);     // COCO
    //find_replace(output_path, "/JPEGImages/", "/labels/", output_path);   // PascalVOC
    find_replace(output_path, "/VOC2007/JPEGImages/", "/VOC2007/labels/", output_path);     // PascalVOC
    find_replace(output_path, "/VOC2012/JPEGImages/", "/VOC2012/labels/", output_path);     // PascalVOC
    //find_replace(output_path, "/raw/", "/labels/", output_path);