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

only accepts input.jpg as image to check #5

Open
robertJene opened this issue Apr 22, 2024 · 0 comments
Open

only accepts input.jpg as image to check #5

robertJene opened this issue Apr 22, 2024 · 0 comments

Comments

@robertJene
Copy link
Collaborator

It throws an error if I try to pass a file to it.

d:\AI_Stuff\StableDiffusion\Training\NightshadeAntidote>python NightshadeAntidote.py "D:\AI_Stuff\StableDiffusion\Training\Celebrities\Alison Pill\MV5BYWE2NjY4ODMtOTMwYS00YWE5LTllNjEtOGY0MzVmODExMWU2XkEyXkFqcGdeQXVyMDk0ODI3OA@@.V1.jpg"
[ WARN:0@0.687] global loadsave.cpp:244 cv::findDecoder imread_('input.jpg'): can't open/read file: check file path/integrity
Traceback (most recent call last):
File "d:\AI_Stuff\StableDiffusion\Training\NightshadeAntidote\NightshadeAntidote.py", line 13, in
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # Converting to grayscale
cv2.error: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

the readme states this:
python nightshade_antidote.py input.jpg

This should mean that the python script accepts the path to an image as an argument.
well. It doesn't.

I want to be able to write a script to check a folder of files.
And I'm not going to move them / rename every single file.

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

No branches or pull requests

1 participant