9bf2004b29aa393400bd904bdf788390f5c0404a,niftynet/layer/binary_masking.py,BinaryMaskingLayer,layer_op,#BinaryMaskingLayer#Any#,62
Before Change
new_mask = np.zeros(image.shape[0:3], dtype=np.bool)
for mod in mod_to_mask:
new_mask = np.logical_or(new_mask, mask[..., mod, t])
mask[..., t] = np.tile(np.expand_dims(new_mask, axis=-1),
[1, mask.shape[3]])
if self.multimod_fusion == "and":
for t in range(0, image.shape[4]):
new_mask = np.ones(image.shape[0:3], dtype=np.bool)
for mod in mod_to_mask:
new_mask = np.logical_and(new_mask, mask[..., mod, t])
mask[..., t] = np.tile(np.expand_dims(new_mask, axis=-1),
[1, mask.shape[3]])
return mask
raise ValueError("unknown input format")
After Change
new_mask = np.zeros(image.shape[0:3], dtype=np.bool)
for mod in mod_to_mask:
new_mask = np.logical_or(new_mask, mask[..., t, mod])
for mod in mod_to_mask:
mask[..., t, mod] = new_mask
if self.multimod_fusion == "and":
for t in range(0, image.shape[3]):
new_mask = np.ones(image.shape[0:3], dtype=np.bool)
for mod in mod_to_mask:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: NifTK/NiftyNet
Commit Name: 9bf2004b29aa393400bd904bdf788390f5c0404a
Time: 2017-08-07
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/binary_masking.py
Class Name: BinaryMaskingLayer
Method Name: layer_op
Project Name: dmlc/gluon-cv
Commit Name: 9f0b230e1f59cb399e36210483bc075760b02eaf
Time: 2018-04-11
Author: cheungchih@gmail.com
File Name: gluonvision/model_zoo/ssd/ssd.py
Class Name: SSD
Method Name: hybrid_forward
Project Name: NifTK/NiftyNet
Commit Name: ae9cf55f6a5775a0d39a869166e8b33d4f39c273
Time: 2017-04-12
Author: wenqi.li@ucl.ac.uk
File Name: region_properties.py
Class Name: RegionProperties
Method Name: __compute_mask