75fb3ffdc4cb9371214acbd29db38d98071dfe82,chainercv/links/model/mask_rcnn/mask_head.py,MaskHead,decode,#MaskHead#Any#Any#Any#Any#,84
Before Change
def decode(self, segms, bboxes, labels, sizes):
// CPU is used because cv2.resize only accepts numpy arrays.
segms = [chainer.backends.cuda.to_cpu(segm) for segm in segms]
bboxes = [chainer.backends.cuda.to_cpu(bbox) for bbox in bboxes]
labels = [chainer.backends.cuda.to_cpu(label) for label in labels]
masks = []
// To work around an issue with cv2.resize (it seems to automatically
After Change
xp = chainer.backends.cuda.get_array_module(*segms)
if xp != np:
raise ValueError(
"MaskHead.decode only supports numpy inputs for now.")
masks = []
// To work around an issue with cv2.resize (it seems to automatically
// pad with repeated border values), we manually zero-pad the masks by 1
// pixel prior to resizing back to the original image resolution.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: chainer/chainercv
Commit Name: 75fb3ffdc4cb9371214acbd29db38d98071dfe82
Time: 2019-02-13
Author: yuyuniitani@gmail.com
File Name: chainercv/links/model/mask_rcnn/mask_head.py
Class Name: MaskHead
Method Name: decode
Project Name: ray-project/ray
Commit Name: 2cf4c7253ce1fd01975fcf970e52434e44f6d71f
Time: 2021-03-04
Author: ekhliang@gmail.com
File Name: python/ray/util/client/worker.py
Class Name: Worker
Method Name: get
Project Name: allenai/allennlp
Commit Name: bb1b1c6e27b273a66135d02a04232835d5bfc3ca
Time: 2019-11-19
Author: max.del.edu@gmail.com
File Name: allennlp/data/token_indexers/pretrained_transformer_indexer.py
Class Name: PretrainedTransformerIndexer
Method Name: tokens_to_indices