Skip to content
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

new: real images augmentation #314

Merged
merged 10 commits into from
Jan 6, 2023
Merged

new: real images augmentation #314

merged 10 commits into from
Jan 6, 2023

Conversation

Data-Iab
Copy link
Collaborator

@Data-Iab Data-Iab commented Dec 23, 2022

  • New feature : 3 different implementations of focus blur augmentation
from alodataset.transforms import RandomFocusBlur, RandomFocusBlurV2, RandomFocusBlurV3

import aloscene
import torch

frame = aloscene.Frame(torch.rand((3, 300, 300)))
blured_frame1 = RandomFocusBlur()(frame)
blured_frame2 = RandomFocusBlurV2()(frame)
blured_frame3 = RandomFocusBlurV3()(frame)
  • New feature : Motion blur augmentation from optical flow
## Motion blur from RAFT-flow
from alonet.raft.raft import RAFT

flow_model = RAFT(weights="raft-things")
flow_model = model.eval()

frame_t0_t1 = aloscene.Frame(torch.ones((2, 3, 300, 300)), names=tuple("TCHW"))
frame_t0 = frame_t0_t1[0]
frame_t1 = frame_t0_t1[1]

blured_t1 = RandomFlowMotionBlur(flow_model=flow_model)(frame_t1, p_frame=frame_t0)
blured_t1.get_view().render()

## Motion blur from ground truth optical flow
flow = aloscene.Flow(torch.ones((2, 300, 300)))
blured_t1 = RandomFlowMotionBlur()(frame_t1, flow=flow)
blured_t1.get_view().render()
  • New feature : Random corner masking augmentation
from alodataset.transforms import RandomCornersMask
import aloscene
import torch

frame = aloscene.Frame(torch.ones((3, 300, 300)))
randomly_masked_frame = RandomCornersMask()(frame)
  • Fix bug X : CameraIntrinsic initialization with a shape of 4x4 was not possible using __init__

This pull request includes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@Data-Iab Data-Iab self-assigned this Dec 23, 2022
@Data-Iab Data-Iab changed the title Augmentations new: motion blur augmentation Dec 26, 2022
@Data-Iab Data-Iab changed the title new: motion blur augmentation new: real images augmentation Jan 6, 2023
@thibo73800 thibo73800 merged commit 9e28449 into master Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants