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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am using the demo script verbatim in VS Code with Python 3.11 and I am getting a circular import error
ImportError: cannot import name 'patchify' from partially initialized module 'patchify' (most likely due to a circular import)
import numpy as np from PIL import Image from patchify import patchify image = Image.open("C:\\Projects\\Python\\Roboflow\\patchify.jpg") image = np.asarray(image) patches = patchify(image, (512, 512, 3), step=512) print(patches.shape) # (6, 10, 1, 512, 512, 3) for i in range(patches.shape[0]): for j in range(patches.shape[1]): patch = patches[i, j, 0] patch = Image.fromarray(patch) num = i * patches.shape[1] + j patch.save(f"patch_{num}.jpg")
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am using the demo script verbatim in VS Code with Python 3.11 and I am getting a circular import error
ImportError: cannot import name 'patchify' from partially initialized module 'patchify' (most likely due to a circular import)
The text was updated successfully, but these errors were encountered: