wayveai / fiery

PyTorch code for the paper "FIERY: Future Instance Segmentation in Bird's-Eye view from Surround Monocular Cameras"
https://wayve.ai/blog/fiery-future-instance-prediction-birds-eye-view
MIT License
556 stars 85 forks source link

output of visualization is BLANK #53

Open SeungHwi0613 opened 1 year ago

SeungHwi0613 commented 1 year ago

example_1

First of all, I really appreciate about your great work.

I tried to run visualise.py

error1)cv2.error: OpenCV(4.7.0) :-1: error: (-5:Bad argument) in function 'line'

Overload resolution failed:

  • Can't parse 'pt1'. Sequence item with index 0 has a wrong type

error2)AttributeError: 'FigureCanvasQTAgg' object has no attribute 'renderer'

solution1) Edit 'visualise.py' line37 ->cv2.line(trajectory_img, (round(path[t][0]),round(path[t][1])) , (round(path[t+1][0]),round(path[t+1][1])), color, 4)

solution2) Edit 'matplotlib/backends/backend_agg.py' def tostring_rgb(self):

def tostring_rgb(self):
    self.renderer = self.get_renderer() # edit
    return self.renderer.tostring_rgb()

================== After this two steps, i solved errors but outputs are empty.

SeungHwi0613 commented 1 year ago

example_1

I solved it, but only BEV segmentation! I want to see the result in right side too. like your example.

bsridatta commented 10 months ago

Could you share how you solved the blank image issue? Thanks

seamie6 commented 5 months ago

Could you share how you solved the blank image issue? Thanks

For myself, I was getting the error AttributeError: 'FigureCanvasTkAgg' object has no attribute 'renderer' when running visualisation and the code was not executing. I tried to fix this by adding fig.canvas.draw() beneath fig = plt.figure(figsize=(4 * val_w, 2 * val_h)) in visualise.py This made the code work but I was getting the blank output as seen above

Instead, I removed the line fig.canvas.draw() used the solution in https://github.com/wayveai/fiery/issues/14 to solve it I do not know if this is the specific issue you are having but I hope it helps