8000 plt.savefig() giving error of too large pixels · Issue #27 · cfotache/pytorch_objectdetecttrack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
plt.savefig() giving error of too large pixels #27
Open
@spaul13

Description

@spaul13

While drawing the bounding boxes in the image using plt.savefig(), I am getting the error of
ValueError: Image size of 3396073x2015469 pixels is too large. It must be less than 2^16 in each direction.
Can anyone please tell me how to resolve the issue and save the bounding boxes?

Complete error log:
plt.savefig(img_path.replace(".jpg", "-det.png"), dpi=500, bbox_inches='tight', pad_inches=0.0)
File "/home/sipaul/anaconda3/envs/pytorch/lib/python3.8/site-packages/matplotlib/pyplot.py", line 723, in savefig
res = fig.savefig(*args, **kwargs)
File "/home/sipaul/anaconda3/envs/pytorch/lib/python3.8/site-packages/matplotlib/figure.py", line 2203, in savefig
self.canvas.print_figure(fname, **kwargs)
File "/home/sipaul/anaconda3/envs/pytorch/lib/python3.8/site-packages/matplotlib/backend_bases.py", line 2119, in print_figure
result = print_method(
File "/home/sipaul/anaconda3/envs/pytorch/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py", line 514, in print_png
FigureCanvasAgg.draw(self)
File "/home/sipaul/anaconda3/envs/pytorch/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py", line 388, in draw
self.renderer = self.get_renderer(cleared=True)
File "/home/sipaul/anaconda3/envs/pytorch/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py", line 404, in get_renderer
self.renderer = RendererAgg(w, h, self.figure.dpi)
File "/home/sipaul/anaconda3/envs/pytorch/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py", line 92, in init
self._renderer = _RendererAgg(int(width), int(height), dpi)
ValueError: Image size of 3396073x2015469 pixels is too large. It must be less than 2^16 in each direction

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0