-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
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
Minimally support accimage.Image #15
Conversation
i'm going to request two small changes.
|
if accimage is not None and isinstance(pic, accimage.Image): | ||
nppic = np.empty([pic.channels, pic.height, pic.width]) | ||
pic.copyto(nppic) | ||
img = torch.from_numpy(np.transpose(nppic, axes=(1, 2, 0))) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
if accimage is None: | ||
img = Image.open(os.path.join(self.root, path)).convert('RGB') | ||
else: | ||
img = accimage.Image(os.path.join(self.root, path)) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This code is merged, with @colesbury's modifications, as #153, so I close the PR. |
Fixing docs format in GIoU Loss
Make
torchvision
useaccimage.Image
when available instead ofPIL.Image
in folder-based loader.