Advertisement

darknet training details involve a hidden hyperparameter: scale.

阅读量:

以下为完整的源代码内容,该代码用于在使用yolo训练检测网络过程中,对输入数据进行预处理操作。此代码段中不仅包含从外部传入的可调节参数(jitter),同时也存在在代码内部直接定义的固定参数(scale)。接下来将对该段代码进行详细分析与说明。

复制代码
    data load_data_detection(int n, char **paths, int m, int w, int h, int boxes, int classes, float jitter, float hue, float saturation, float exposure)
    {
    char **random_paths = get_random_paths(paths, n, m);
    int i;
    data d = {0};
    d.shallow = 0;
    
    d.X.rows = n;
    d.X.vals = calloc(d.X.rows, sizeof(float*));
    d.X.cols = h*w*3;
    
    d.y = make_matrix(n, 5*boxes);
    for(i = 0; i < n; ++i){
        image orig = load_image_color(random_

全部评论 (0)

还没有任何评论哟~