'How to label images (in .jpg) in a folder using Python's Pigeon package?

I have a folder comprising ~10K images all in .jpg format. I want to label each image, so I call the multi-label pigeon package. I run the following Python code (available on the web):

from multi_label_pigeon import multi_label_annotate
from IPython.display import display, Image

folder = 'path/to/folder/comprising/images/*.jpg'

annotations = multi_label_annotate(folder, 
options={'black':['yes','no'], 'white':['yes','no'],'red':['yes','no']}, 
display_fn=lambda filename: display(Image(filename)))

However, the code is not unable to read the images from the specified folder. Is there anything that I am doing wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source