Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
DigVice1502
/
MedAI
like
1
Runtime error
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
1feeda7
MedAI
/
channel.py
samreenhabib
app
c3b7cfb
over 2 years ago
raw
Copy download link
history
blame
Safe
195 Bytes
from
PIL
import
Image
# Open the image
image = Image.
open
(
'uploads/B0001_rgb.jpg'
)
# Get the number of channels
num_channels =
len
(image.getbands())
print
(
"Number of channels:"
, num_channels)