OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor

Let’s try one more thing.
The file exists but the files are not available from the folder where your code is located.
try
!ls {PATH}

!ls {PATH}train

if they bring rows back please post a copy of the notebook


as per you directed sir

how can i remove this class ,because i don’t know how it happened to be a class

is it because i have .JPG as the file extension name rather than .jpg on 2 files of train set

Looks like you have your iPython Checkpoints saved inside the same folder. Remove them, you should be good.

yup it a hidden file removed it just now because lately i happen to know little bit unix too

1 Like

nope it didn’t solve the problem

What are the name of the classes being displayed now?

same which was displayed earlier
what i did in unix is rmdir .ipynb_checkpoint

I guess you’re running the notebook inside the data folder? The reason why it drops its checkpoints inside the folder?
Or Have you tried restarting the kernel and training again?

i tried couple of times but result is the same but what i observe along with .ipynb _checkpoints there were
. and …
when i tried to remove them rm -rf .
rm: refusing to remove ‘.’ or ‘…’ directory: skipping '.'
i don’t know might be they are causing this issue
what i think i should upload my data once again since this time they are less in number both from training and valid set.let see what happen

nope it didn’t worked

try rm -r
It worked for me.

I was facing same problem. But it resolved now.
Please check path of image by debugging code. Try to remove space in the path. check image is available in correct format.