pmj110119 / YOLOX_deepsort_tracker

using yolox+deepsort for object-tracking
281 stars 58 forks source link

TypeError: load() missing 1 required positional argument: 'Loader' #13

Open zkailinzhang opened 2 years ago

zkailinzhang commented 2 years ago

File "/YOLOX_deepsort_tracker/detector.py", line 53, in detect )[0].cpu().numpy() AttributeError: 'NoneType' object has no attribute 'cpu'

namtranase commented 2 years ago

Try this:

        with torch.no_grad():
            outputs = self.model(img)
            outputs = postprocess(
                outputs, self.exp.num_classes, self.exp.test_conf, self.exp.nmsthre  # TODO:用户可更改
            )
            if outputs[0] is not None:
                outputs = outputs[0].cpu().numpy()