Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError with Channel Histogram and Quality Estimation #66

Open
bel2k10x opened this issue Dec 31, 2022 · 2 comments
Open

IndexError with Channel Histogram and Quality Estimation #66

bel2k10x opened this issue Dec 31, 2022 · 2 comments

Comments

@bel2k10x
Copy link

Hi, Great tool, thanks for that.
I installed it with mamba on windows 10 plateform. Everything is Ok but when i try to use 'Channel Histogram' or 'Quality Estimation' i receive the error messages below. (i tried different picture format jpg bmp webp png)

I have the mathplotlib version 3.6.0 like asked in requirments.txt and python=3.8.15
all the version in requirments.txt are the same, except that i had to remove python-magic and installed python-magic-bin=0.4.14 as explained here #46 (comment)

Thanks for any help.

  • Channel Histogram:

(sherloq) D:\AI\FakeDetect\sherloq\gui>python sherloq.py
WARNING:tensorflow:From C:\Users\Did\mambaforge\envs\sherloq\lib\site-packages\tensorflow\python\compat\v2_compat.py:107: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
Traceback (most recent call last):
File "sherloq.py", line 347, in open_tool
tool_widget = HistWidget(self.image)
File "D:\AI\FakeDetect\sherloq\gui\histogram.py", line 105, in init
self.redraw()
File "D:\AI\FakeDetect\sherloq\gui\histogram.py", line 165, in redraw
self.axes.fill_between(x, y, alpha=alpha, facecolor="k", step=step)
File "C:\Users\Did\mambaforge\envs\sherloq\lib\site-packages\matplotlib_init_.py", line 1423, in inner
return func(ax, *map(sanitize_sequence, args), **kwargs)
File "C:\Users\Did\mambaforge\envs\sherloq\lib\site-packages\matplotlib\axes_axes.py", line 5335, in fill_between
return self._fill_between_x_or_y(
File "C:\Users\Did\mambaforge\envs\sherloq\lib\site-packages\matplotlib\axes_axes.py", line 5263, in fill_between_x_or_y
for idx0, idx1 in cbook.contiguous_regions(where):
File "C:\Users\Did\mambaforge\envs\sherloq\lib\site-packages\matplotlib\cbook_init
.py", line 1333, in contiguous_regions
idx, = np.nonzero(mask[:-1] != mask[1:])
IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed

  • Quality Estimation

Traceback (most recent call last):
File "sherloq.py", line 387, in open_tool
tool_widget = QualityWidget(self.filename, self.image)
File "D:\AI\FakeDetect\sherloq\gui\quality.py", line 41, in init
axes.fill_between(x, y * 100, alpha=0.2)
File "C:\Users\Did\mambaforge\envs\sherloq\lib\site-packages\matplotlib_init_.py", line 1423, in inner
return func(ax, *map(sanitize_sequence, args), **kwargs)
File "C:\Users\Did\mambaforge\envs\sherloq\lib\site-packages\matplotlib\axes_axes.py", line 5335, in fill_between
return self._fill_between_x_or_y(
File "C:\Users\Did\mambaforge\envs\sherloq\lib\site-packages\matplotlib\axes_axes.py", line 5263, in fill_between_x_or_y
for idx0, idx1 in cbook.contiguous_regions(where):
File "C:\Users\Did\mambaforge\envs\sherloq\lib\site-packages\matplotlib\cbook_init
.py", line 1333, in contiguous_regions
idx, = np.nonzero(mask[:-1] != mask[1:])
IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed

@GuidoBartoli
Copy link
Owner

GuidoBartoli commented Dec 31, 2022

Hi, Great tool, thanks for that.

Thanks to you! 👍🏻

I installed it with mamba on windows 10 platform. Everything is Ok but when i try to use 'Channel Histogram' or 'Quality Estimation' i receive the error messages below. (i tried different picture format jpg bmp webp png)

Ok, thanks for the detailed report, I will look into that as soon as possible, I have to setup a Windows VM to try it out, because at the moment I only have Linux on my PCs.

@GuidoBartoli
Copy link
Owner

Is this an error you receive for any image you load or it happens only with one in particular?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants