3df28dc6f0bb0704febd6bd1467bb728f4fbe771,cellprofiler/modules/measuretexture.py,MeasureTexture,run_one,#MeasureTexture#Any#Any#Any#Any#,490

Before Change


        // mahotas.features.haralick bricks itself when provided a dtype larger than uint8 (version 1.4.3)
        pixel_data = skimage.exposure.rescale_intensity(pixel_data,out_range=(0,gray_levels-1)).astype(numpy.uint8)

        features = numpy.empty((n_directions, 13, len(unique_labels)))

        for index, label in enumerate(unique_labels):
            label_data = numpy.zeros_like(pixel_data)

After Change


        pixel_data = skimage.exposure.rescale_intensity(pixel_data,out_range=(0,gray_levels-1)).astype(numpy.uint8)
        props = skimage.measure.regionprops(labels, pixel_data)
        per_label = [self.run_mahotas(prop, scale, n_directions) for prop in props]
        features = dask.compute(per_label, scheduler="threads")
        features = numpy.array(features)[0].transpose(1,2,0)

        for direction, direction_features in enumerate(features):
            for feature_name, feature in zip(F_HARALICK, direction_features):
                statistics += self.record_measurement(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: CellProfiler/CellProfiler
Commit Name: 3df28dc6f0bb0704febd6bd1467bb728f4fbe771
Time: 2020-08-13
Author: beth.cimini@gmail.com
File Name: cellprofiler/modules/measuretexture.py
Class Name: MeasureTexture
Method Name: run_one


Project Name: williamFalcon/pytorch-lightning
Commit Name: 0e8ec93b28ecd86898b3668d48d346f510e95167
Time: 2021-01-06
Author: jspaezp@users.noreply.github.com
File Name: pl_examples/domain_templates/computer_vision_fine_tuning.py
Class Name: TransferLearningModel
Method Name: validation_epoch_end


Project Name: williamFalcon/pytorch-lightning
Commit Name: 0e8ec93b28ecd86898b3668d48d346f510e95167
Time: 2021-01-06
Author: jspaezp@users.noreply.github.com
File Name: pl_examples/domain_templates/computer_vision_fine_tuning.py
Class Name: TransferLearningModel
Method Name: training_epoch_end