Unverified Commit 1388b4ec authored by David de la Iglesia Castro's avatar David de la Iglesia Castro Committed by GitHub
Browse files

[Refactor]: Add deprecate warnings of LoadImage (#4813)

* Remove LoadImage

* Add deprecation warning
parent 263ae90c
......@@ -54,7 +54,10 @@ def init_detector(config, checkpoint=None, device='cuda:0', cfg_options=None):
class LoadImage(object):
"""A simple pipeline to load image."""
A simple pipeline to load image.
def __call__(self, results):
"""Call function to load images into results.
......@@ -62,10 +65,13 @@ class LoadImage(object):
results (dict): A result dict contains the file name
of the image to be read.
dict: ``results`` will be returned containing loaded image.
warnings.warn('`LoadImage` is deprecated and will be removed in '
'future releases. You may use `LoadImageFromWebcam` '
'from `mmdet.datasets.pipelines.` instead.')
if isinstance(results['img'], str):
results['filename'] = results['img']
results['ori_filename'] = results['img']
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment