0

please would anyone help with codes for grayscale image count in TensorFlow? This is what I have tried and I am getting smaller count (say 48) compare with more than a thousand images in the folder.

My data in DATADIR:

image_count = len(list(DATADIR))
print("No of Images =", image_count)
2
  • 1
    Is it what you need stackoverflow.com/questions/2632205/… ? Commented Nov 16, 2020 at 10:27
  • Post more of your code, specifically where DATADIR is defined. I suspect DATADIR is a str of the filepath, which happens to be 48 characters long. You probably want to call os.listdir(). Commented Nov 17, 2020 at 15:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.