We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
Umm, assuming there's a timestamp in the image filenames for sorting, we can work on it as follows:.
import os from PIL import Image import matplotlib.pyplot as plt
dataset_path = 'ds_path' image_files = sorted(os.listdir(ds_path), key=os.path.getmtime, reverse=True)[:10]
fig, axes = plt.subplots(2, 5, figsize=(12, 6)) fig.suptitle("Last 10 Images for Sugar Cube")
for i, image_file in enumerate(image_files): image_path = os.path.join(ds_path, image_file) image = Image.open(image_path)
axes[i // 5, i % 5].imshow(image) axes[i // 5, i % 5].axis('off') axes[i // 5, i % 5].set_title(f"Image {i + 1}")
plt.show()
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: