pytorch/android-demo-app

results of objection dection on Android are very poor,but on PC they are very good

julien0220 opened this issue · 1 comments

Can detect the correct class, but the probability is reduced

runing on pc, it gets 83%
image

running on android, it gets 55%
Screenshot_20230626-102515_YOLOv5

There are slight difference from mobile devices,
but try this:

seed=2023
random.seed(seed)
numpy.random.seed(seed)
torch.manual_seed(seed)
if torch.cuda.is_available():
    torch.cuda.manual_seed(seed)
    torch.cuda.manual_seed_all(seed)  # all gpus
    torch.backends.cudnn.benchmark = False
    torch.backends.cudnn.deterministic = True
torch.use_deterministic_algorithms(True)
torch.set_default_tensor_type(torch.float32)