CoolFace
Apppublic

samH98/LungCancerDetection

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
channel.py10 linesDownload Raw Back to root
1from PIL import Image2 3# Open the image4image = Image.open('uploads/B0001_rgb.jpg')5 6# Get the number of channels7num_channels = len(image.getbands())8 9print("Number of channels:", num_channels)10