Skip to content

Instantly share code, notes, and snippets.

@arunm8489
Created June 6, 2020 02:32
Show Gist options
  • Save arunm8489/df8520853230c4065b6c543183784583 to your computer and use it in GitHub Desktop.
Save arunm8489/df8520853230c4065b6c543183784583 to your computer and use it in GitHub Desktop.
im_dim = original_img_dim[0], original_img_dim[1]
im_dim = torch.FloatTensor(im_dim).repeat(1,2)
#If there's a GPU availible, put the model on GPU
if CUDA:
im_dim = im_dim_list.cuda()
model.cuda()
#Set the model in evaluation mode
model.eval()
with torch.no_grad():
prediction = model(processed_image)
output = final_detection(prediction, confidence_threshold=0.5, num_classes=80, nms_conf = nms_thesh)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment