hello.mmdet.infer module

class hello.mmdet.infer.Detector(config_file, checkpoint_file, device='cuda:0', cfg_options=None)[source]

Bases: object

test_image(image_path, score_thr=0.3, out_file=None)[source]

Inference image with the detector.

Parameters

img (str) – Image file.

test_images(images_or_dir, score_thr=0.3, out_dir=None)[source]

Inference images with the detector.

Parameters

images_or_dir (str or list[str]) – Image files.

to_file(results, txt_file)[source]

Format results.

Such as:

filepath,height,width,x1,y1,x2,y2,confidence,label,x1,y1,x2,y2,confidence,label

Parameters

results (list[tuple]) – The results.

hello.mmdet.infer.func(root, config_file, checkpoint_file, images_dir, score_thr, out_dir, txt_file)[source]
hello.mmdet.infer.main(args=None)[source]
hello.mmdet.infer.parse_args(args=None)[source]