Comments (2)
Hi, you can run a loop to aggregate all the predicted binary masks:
# create an all-zeros mask
single_channel_mask = torch.zeros_like(image)
# loop through all instance masks
for cls_id, mask in zip(result.pred_classes, result.pred_masks):
mask *= cls_id
single_channel_mask = torch.max(single_channel_mask, mask)
from oneformer.
Thanks for your help.
from oneformer.
Related Issues (20)
- undefined symbol: _ZNK3c107SymBool10guard_boolEPKcl
- whether I need to download Swin transformer pretraining weight for training
- Swin large backbone warning: "norm.bias will not be loaded. Please double check and see if this is desired." HOT 1
- AssertionError when trying to reproduce result HOT 2
- Inference time
- Class labels Issue
- Different result in different GPU
- Update colab demo HOT 1
- Resources required to fine-tune this model with swin-l HOT 13
- Potential code bug but always good model
- license issue
- demo.py问题 HOT 1
- Installation Issues with Detectron2 HOT 1
- ModuleNotFoundError: No module named 'detectron2.config' HOT 3
- Wrong citation
- What is the expected dimension sizes for the outputs dictionary from sem_seg_head? HOT 3
- Installation and setting up this repo is challenging HOT 1
- How to set prefetch_factor? HOT 1
- How to set the image size to run demo ?
- Runtime Error 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 oneformer.