b776ae08e9e676435c5cf8d1f31a86dfd3e1897f,chainercv/utils/image/read_image.py,,read_image,#Any#Any#Any#,5
Before Change
img = f.convert("RGB")
else:
img = f.convert("P")
img = np.asarray(img, dtype=dtype)
finally:
if hasattr(f, "close"):
f.close()
After Change
Returns:
~numpy.ndarray: An image.
if chainer.config.cv_read_image_backend == "cv2":
if _cv2_available:
return _read_image_cv2(path, dtype, color)
else:
warnings.warn(
"Although `chainer.config.cv_read_image_backend == "cv2"`, "
"cv2 is not found. As a fallback option, read_image uses "
"PIL. Either install cv2 or set "
"`chainer.config.cv_read_image_backend = "PIL" to suppress "
"this warning.")
return _read_image_pil(path, dtype, color)
elif chainer.config.cv_read_image_backend == "PIL":
return _read_image_pil(path, dtype, color)
else:
raise ValueError("chainer.config.cv_read_image_backend should be "
"either "cv2" or "PIL".")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: chainer/chainercv
Commit Name: b776ae08e9e676435c5cf8d1f31a86dfd3e1897f
Time: 2018-10-20
Author: yuyuniitani@gmail.com
File Name: chainercv/utils/image/read_image.py
Class Name:
Method Name: read_image
Project Name: ilastik/ilastik
Commit Name: 15b116a944db990b88726ea9e1c712ba9bf33333
Time: 2017-11-07
Author: carstenhaubold@googlemail.com
File Name: ilastik/plugins_default/tracking_mamut_export.py
Class Name: TrackingMamutExportFormatPlugin
Method Name: export
Project Name: scipy/scipy
Commit Name: 5781ad6adae3c4e4f264eab4de9050095eab6a6d
Time: 2016-08-27
Author: surhud.more@ipmu.jp
File Name: scipy/optimize/minpack.py
Class Name:
Method Name: curve_fit