Comments (2)
A workarround i've find :
def iris2_training(segmentation_item:dict):
transform = A.Compose([
A.LongestMaxSize(max_size=MAX_SIZE),
A.PadIfNeeded(
min_height=MIN_IMG_HEIGHT,
min_width=MIN_IMG_WIDTH,
border_mode=cv2.BORDER_CONSTANT,
value=0,
always_apply=True),
A.HorizontalFlip(),
A.RandomCrop(MIN_IMG_HEIGHT,MIN_IMG_WIDTH),
A.ToFloat(max_value=255),
ToTensorV2()
],
bbox_params=A.BboxParams(format='pascal_voc',label_fields=['labels','ids'],min_visibility=BBOX_MIN_VISIBILITY),
is_check_shapes=False
)
output = transform(
image=segmentation_item['image'],
masks=segmentation_item['masks'],
bboxes=segmentation_item['boxes'],
labels=segmentation_item['labels'],
ids=range(len(segmentation_item['labels']))
)
return dict(
image=output['image'],
boxes=output['bboxes'],
labels=output['labels'],
masks=[output['masks'][i] for i in output['ids']],
name=segmentation_item['name']
)
But it should be working without it.
from albumentations.
Thanks for the proposed solution!
Yep, we do have this issue that masks, boxes and keypoints and not binded on the instance level.
Your approach is the best that I have seen so far for this problem.
from albumentations.
Related Issues (20)
- [Documentation] Clean up always_apply from docs HOT 1
- [Documentation] Add to documentation about HFHub load / save functionality HOT 1
- Targets that should be ignored HOT 10
- [Feature Request] Add Text Transform HOT 2
- Optional version update check on library import HOT 1
- Huggingface demo link in docs does not allow user uploaded images HOT 2
- opencv-python-headless continues to be installed despite meeting MIN_OPENCV_VERSION with opencv-python HOT 7
- [Bug] When applying `return_params=True` in Compose, it does not return class names, butintegers, instead
- [Feature request] Add balanced scale to `Affine`
- Request: ability to reject augmented images
- AttributeError: 'Albumentations' object has no attribute 'contains_spatial' HOT 2
- GaussNoise broken in 1.4.9 HOT 12
- Can't do any data augmentation on my custom dataset in FiftyOne HOT 1
- Environmental variables to disable auto-update seems to be NO_ALBUMENTATIONS_UPDATE but is documented as ALBUMENTATIONS_NO_AUTO_UPDATE HOT 1
- [Benchmark] Add Augmentor to bechmark
- [Bug] Bug in RandomCropNearBBox HOT 1
- Fix available keys
- [it may be a bug but I am not sure] rotating and cropping adding in pixels HOT 4
- keypoint position shifting during image rotation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from albumentations.