diff --git a/examples/demo/detection_file.json b/examples/demo/detection_file.json new file mode 100644 index 00000000..83964c27 --- /dev/null +++ b/examples/demo/detection_file.json @@ -0,0 +1,12 @@ +[ + { + "image_id": "~/data/img/1_2-A6zakvKX2opVnyx9gplQ.jpg", + "bbox": [ + 1440.0252, + 718.1178300000001, + 99.15962999999999, + 51.790379999999914 + ], + "score": 0 + } +] \ No newline at end of file diff --git a/scripts/demo_inference.py b/scripts/demo_inference.py index a4958cad..83e6e2bc 100644 --- a/scripts/demo_inference.py +++ b/scripts/demo_inference.py @@ -176,6 +176,9 @@ def loop(): det_loader = DetectionLoader(input_source, get_detector(args), cfg, args, batchSize=args.detbatch, mode=mode, queueSize=args.qsize) det_worker = det_loader.start() + (inps, orig_img, im_name, boxes, scores, ids, cropped_boxes) = det_loader.read() + boxes = boxes.float() + # Load pose model pose_model = builder.build_sppe(cfg.MODEL, preset_cfg=cfg.DATA_PRESET) @@ -224,7 +227,6 @@ def loop(): for i in im_names_desc: start_time = getTime() with torch.no_grad(): - (inps, orig_img, im_name, boxes, scores, ids, cropped_boxes) = det_loader.read() if orig_img is None: break if boxes is None or boxes.nelement() == 0: