Comments (2)
Thanks for the feature request @matlabninja .
Supporting 1. and 3. SGTM, we could add target_types="binary-category"
and target_types="detection"
.
I'm not sure I completely follow what you mean by 2. though - could you please share more details about this?
With the segmentation target type, produce trimaps with class/background/don't care regions instead of target/background/don't care when the output is a tensor
In the meantime, please feel free to submit a PR for 1. and 3.
from vision.
Thanks for the feedback @NicolasHug, I've put in a PR for 1. I made some changes to my original code to support "binary-category" as a target type, as that seemed to make more sense from a useability perspective than my previous setup with a separate input for "binary". As a result, I'll probably wait for 1 to clear before doing 3 as it opens up the door for binary detection as well.
I've put it in as draft as I am having some trouble running the unit tests locally (partially initialized module likely due to circular import). It's happening on all unit tests not just mine, so something is whacky with my config maybe. I was going to see how it went with running the unit tests in github instead.
Regarding the segmentation modification, all of the trimap png files in this dataset contain only the values 1, 2, and 3. 1 is used for pixels on the the pet, 2 for background, and 3 for a boundary region that can be used with the "ignore_index" of a loss function to not use that region for training. These png files do not have any class specific information in them, and the existing data loader, these files are loaded up directly. This doesn't let us use the data loader as-is to train a segmentation model supporting class differentiation.
The modification that I made changes that, but because modifying PIL images based on masks is a pain, I had this modification run after the transforms convert it to tensor. I certainly 'can' have it run earlier so that it is not transform dependent. See below for a example outputs with the current data loader. The change results in the background (2) becoming 37, the boundary region (3) becoming 38, and the "foreground region" (1) becoming something on [0,36] corresponding to the class label.
from vision.
Related Issues (20)
- M1 jobs are all failing HOT 2
- mean/variance naming consistency
- Support NumPy 2.0 HOT 3
- Torchvision nightly not being published for Linux, Python 3.11. CUDA 11.8 HOT 2
- SBDataset downloads fails because train_noval.txt is no more available at the specified url HOT 4
- Put back MPS builds HOT 6
- M1 conda-py3_11-cpu failing HOT 1
- Batched (random) augmentations HOT 3
- nconsistency between torchvision.datasets.cifar.CIFAR10.data return and torchvision.datasets.cifar.CIFAR10.__getitem__() HOT 3
- Efficientnet_b3 pretrained model load with invalid hash value HOT 1
- Swin Transformer stochastic_depth_prob arguments HOT 1
- Improve empty import time of torchvision HOT 2
- MD5 checksum of the download file ./data/celeba/img_align_celeba.zip does not match HOT 2
- celebA dataset issue with downloading HOT 1
- `fasterrcnn_resnet50_fpn` edits weights on-the-fly HOT 1
- Can we add datatype support for examples under references HOT 2
- Add support for recentering for RandomAffine and RandomPerspective transformations HOT 1
- Typo on documentation example HOT 1
- [Documentation] Improve Clarity on `torchvision.io.write_video` options HOT 1
- Obscure error messages using VideoReader when PyAV version too old/not installed HOT 1
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 vision.