Comments (5)
The overlap is calculated with mask instead of box.
from mask2former.
The ZeroDivisionError: division by zero
is because n
(number of classes) is zero in your defined dataset. Please check your data is in the COCO panoptic segmentation format: https://cocodataset.org/#format-data
from mask2former.
Thanks for replying.
I find out what happened, but am still confused.
My data is in the COCO panoptic segmentation format. And training schedule seems alright.
The problem lies in that n
in panopticapi.evaluation.pq_average
is not increased due to an empty prediction.
(where all of catagories skipping n += 1
because of tp + fp + fn == 0: continue
). I will report this to panopticapi
.
But I still wonder how to prevent emtpy predition from the mask2former
model.
It looks like following. I am still confused about
{
"images": [...],
"annotations": [
{
"image_id": "0012",
"file_name": "0012.png",
"segments_info": []
},...
],
"categories": [...]
}
def pq_average(self, categories, isthing):
pq, sq, rq, n = 0, 0, 0, 0
per_class_results = {}
for label, label_info in categories.items():
if isthing is not None:
cat_isthing = label_info['isthing'] == 1
if isthing != cat_isthing:
continue
iou = self.pq_per_cat[label].iou
tp = self.pq_per_cat[label].tp
fp = self.pq_per_cat[label].fp
fn = self.pq_per_cat[label].fn
>> if tp + fp + fn == 0:
>> per_class_results[label] = {'pq': 0.0, 'sq': 0.0, 'rq': 0.0}
>> continue
>> n += 1
pq_class = iou / (tp + 0.5 * fp + 0.5 * fn)
sq_class = iou / tp if tp != 0 else 0
rq_class = tp / (tp + 0.5 * fp + 0.5 * fn)
per_class_results[label] = {'pq': pq_class, 'sq': sq_class, 'rq': rq_class}
pq += pq_class
sq += sq_class
rq += rq_class
return {'pq': pq / n, 'sq': sq / n, 'rq': rq / n, 'n': n}, per_class_results
from mask2former.
I'm also curious about the following configuration in config/*.yaml
Does it mean that, when two bbox overlap to a certain extend, smaller one will be suppress ?
For my own dataset and task, stuff (isthing=0) category will always occupy most of the picture, with thing(instance) ones drenched in it. While some instances will also overlap with each other.
TEST:
SEMANTIC_ON: False
INSTANCE_ON: False
PANOPTIC_ON: True
OVERLAP_THRESHOLD: 0.8
OBJECT_MASK_THRESHOLD: 0.8
Best regards ~
from mask2former.
@JasonRichard Hi! Did you resolve this problem?
from mask2former.
Related Issues (20)
- batch_size doesn't affect evaluation
- how use custom pre-trained backbone in mask2former HOT 1
- why swin accept different input size
- loading swintransformer
- Ambiguous checkpoint key error when running train_net.py HOT 1
- difference among different mode
- Prebuilt wheels provided via 3rd party repository
- Using COCO for the dataset, what is the appropriate adjustment for learning rate if using a single GPU
- Run in colab seems that there's a ModuleNotFoundError related to the MultiScaleDeformableAttention module.
- Poor Output image quality
- Mask loss with soft labels
- Custom dataset registration to use a model trained on Cityscapes for semantic segmentation.
- How should I fix the input size during testing? HOT 3
- Could you please let me know if anyone has successfully trained using the YouTube VIS 2021 dataset? How should the dataset be formatted?
- How to train only the semantic segmentation weights of ade20k?
- RuntimeError: d.is_cuda() INTERNAL ASSERT FAILED
- Setup up for fine-tuning of mask2former for binary segmentation using low-rank adaptation
- Division by zero caused by mask operation
- AP/AR result from the inference results.json in video instance segmentation
- how to understand predicting mask_embed using only query_feat
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 mask2former.