Closed kiter-zero closed 1 year ago
I have sent you the visualization code via email. Thus, I'll close this issue.
Dear @qianyuzqy , Could you also send me the code for visualisation.
Hi @Sairam13001 ,
I'm sorry for not getting back to you sooner. I have been infected with the Swine Flu virus and feel terrible now.
You could tell me your email address and I will send you the visualization code as soon as possible.
It's okay @qianyuzqy, I figured it out. Thank you so much for your reply. I hope you get well soon. Take care.
Hi @Sairam13001 ,
I'm sorry for not getting back to you sooner. I have been infected with the Swine Flu virus and feel terrible now.
You could tell me your email address and I will send you the visualization code as soon as possible.
Hi, I hope you get better as soon as possible. I would be grateful if you could send it to me as well. amirmahdinikoukaran@gmail.com
It's okay @qianyuzqy, I figured it out. Thank you so much for your reply. I hope you get well soon. Take care.
Hai, Can you tell me how to visualize the image? I have got the code given by the author, but I got an error in running it.
Hi @fisal-ITS, Do you want to visualise the model predictions?
In TransVoD_lite, as we are setting the number of queries as 100, we get 100 predictions on each image right? Do you want to visualise all these predictions or the prediction with the highest score? Please let me know .
Hi @Sairam13001 thank you for the reply. I need to know the prediction with the highest score only. Actually, i tried to visualize predicted object on image just like fig 10 in the paper. Can you help me out?
In engine_single.py in train_one_epoch:
outputs = model(samples)
# outputs is a dictionary containing 'pred_logits', 'pred_boxes', 'aux_outputs'
Below, I am writing a sample code to visualize bboxes with score greater than a threshold (this can be modified as per your requirement):
for i in range(outputs['pred_logits'].shape[0]):
img_id = targets[i]['image_id']
image = read image using cv2 from your data folder using the img_id or image_name (this depends on how you have created your json file)
for j in range(outputs['pred_logits'].shape[1]):
if (outputs['pred_logits'][i][j][1] > 0):
bbox = outputs['pred_boxes'][i][j]
bbox_xyxy = box_cxcywh_to_xyxy(bbox * torch.tensor([w,h,w,h], dtype=torch.float32).to(device))
start_pt = (int(bbox_xyxy[0]), int(bbox_xyxy[1]))
end_pt = (int(bbox_xyxy[2]), int(bbox_xyxy[3]))
image = cv2.rectangle(image, start_pt, end_pt, pred_bbox_color, 2)
cv2.imwrite(path_to_save_imgs+img_name, image)
I hope this helps. Let me know if you need more details.
Hi @Sairam13001 , thank you for your reply. I have tried using your way of visualization. But it didn't produce the right result. Can you give us more details ?
Perhaps there is information from my work for additional information needed I will provide it.
I have sent you the visualization code via email. Thus, I'll close this issue.
Hi Could you send the code for me too? or uploading it here?
I have sent you the visualization code via email. Thus, I'll close this issue.
Hi Could you send the code for me too? or uploading it here?
Hi, you can email me. amirmahdinikoukaran@gmail.com
Dear authors, really impressive approach and great results! Thank you for publishing your work. Could you please offer the code to visualize the image or the video? Thank you in advance!