b32e4498c65bc3ca913fca9f729bc1d43d12d884,plantcv/plantcv/visualize/colorize_masks.py,,colorize_masks,#Any#Any#,10

Before Change


    elif all(isinstance(x, tuple) for x in colors):
        for i in range(0, len(masks)):
            mask = np.copy(masks[i])
            mask = cv2.cvtColor(mask, cv2.COLOR_GRAY2BGR)
            mask[masks[i] > 0] = colors[i]
            colored_img = colored_img + mask
    else:
        fatal_error("All elements of the "colors" list must be the same type (all str or all tuples)")

After Change


    for i in range(0, len(masks)):
        mask = np.copy(masks[i])
        mask = cv2.cvtColor(mask, cv2.COLOR_GRAY2BGR)
        if isinstance(colors[i], tuple):
            mask[masks[i] > 0] = colors[i]
        elif isinstance(colors[i], str):
            mask[masks[i] > 0] = color_dict[colors[i]]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: danforthcenter/plantcv
Commit Name: b32e4498c65bc3ca913fca9f729bc1d43d12d884
Time: 2019-03-15
Author: haleyschuhl@gmail.com
File Name: plantcv/plantcv/visualize/colorize_masks.py
Class Name:
Method Name: colorize_masks


Project Name: danforthcenter/plantcv
Commit Name: b32e4498c65bc3ca913fca9f729bc1d43d12d884
Time: 2019-03-15
Author: haleyschuhl@gmail.com
File Name: plantcv/plantcv/visualize/colorize_masks.py
Class Name:
Method Name: colorize_masks


Project Name: xinntao/BasicSR
Commit Name: 6917d8a3dbf6617f02b1247fd50fbc20d3cb6fd4
Time: 2018-06-10
Author: wxt1994@126.com
File Name: codes/data/LR_dataset.py
Class Name: LRDataset
Method Name: __getitem__


Project Name: dmlc/gluon-cv
Commit Name: fdd55d36c05c747643fc98430a7f9b787b6cec16
Time: 2019-08-29
Author: yizhu59@gmail.com
File Name: gluoncv/data/kinetics400/classification.py
Class Name: Kinetics400
Method Name: _TSN_RGB