GithubHelp home page GithubHelp logo

Comments (6)

LiWentomng avatar LiWentomng commented on June 3, 2024

@VikasRajashekar
The line#94 in config file also needs to be changed for one class, like following,
class_weight=[1.0] * 1 + [0.1])

Btw. The training step and max_iters (50e by default) need to be changed proportionally according to the number of your training images.

from boxinstseg.

VikasRajashekar avatar VikasRajashekar commented on June 3, 2024

@LiWentomng Thanks for the input.
I did change it. But however I face the following issue.

 File "/netscratch/rajashekar/SAIL/BoxInst2/BoxInstSeg-main/mmdet/models/seg_heads/panoptic_fusion_heads/maskformer_fusion_head.py", line 140, in instance_postprocess
  File "/netscratch/rajashekar/SAIL/BoxInst2/BoxInstSeg-main/mmdet/models/seg_heads/panoptic_fusion_heads/maskformer_fusion_head.py", line 140, in instance_postprocess
RuntimeError: selected index k out of range
    scores_per_image, top_indices = scores.flatten(0, 1).topk(
RuntimeError: selected index k out of range
    scores_per_image, top_indices = scores.flatten(0, 1).topk(
RuntimeError: selected index k out of range
        scores_per_image, top_indices = scores.flatten(0, 1).topk(

I did debug the values of scores.flatten(0, 1),max_per_image,mask_cls in the file maskformer_fusion_head.
For each image it is always as follows:

scores.flatten(0, 1).shape=torch.Size([100])
max_per_image=1500
mask_cls=torch.Size([100, 2])

I tried to hardcode the topk to 100 and ran the evaluation but got very poor results:

COCOeval_opt.evaluate() finished in 12.34 seconds.

 Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=2000 ] = 0.121
 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=2000 ] = 0.239
 Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=2000 ] = 0.112
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=2000 ] = 0.082
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=2000 ] = 0.152
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=2000 ] = 0.249
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.165
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=500 ] = 0.165
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=2000 ] = 0.165
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=2000 ] = 0.096
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=2000 ] = 0.207
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=2000 ] = 0.377


Evaluating segm...
Loading and preparing results...
DONE (t=1.51s)
creating index...
index created!
Changing MaxDets and areas
Evaluate annotation type *segm*
COCOeval_opt.evaluate() finished in 18.51 seconds.

 Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=2000 ] = 0.003
 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=2000 ] = 0.006
 Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=2000 ] = 0.003
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=2000 ] = 0.003
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=2000 ] = 0.001
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=2000 ] = 0.000
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.001
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=500 ] = 0.001
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=2000 ] = 0.001
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=2000 ] = 0.001
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=2000 ] = 0.001
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=2000 ] = 0.000

I am attaching the config file and the corresponding log file.
config_logs.zip

Am I missing something? Or is it a bug?
Looking forward for your inputs.

from boxinstseg.

VikasRajashekar avatar VikasRajashekar commented on June 3, 2024

@LiWentomng looking for your input.

from boxinstseg.

VikasRajashekar avatar VikasRajashekar commented on June 3, 2024

@LiWentomng Any update?

from boxinstseg.

LiWentomng avatar LiWentomng commented on June 3, 2024

@VikasRajashekar
Sorry to reply later! I'm busy recently so that with no input for this issue.
Have you test BoxInst and BoxLevelset in this rep for your dataset? Can it run well?

I have test the Box2mask on ICDAR2019 dataset with one class, which can run well without the above errors RuntimeError: selected index k out of range.

I suggest you try the BoxInst and BoxLevelset firstly.

Any further questions can be discussed.

from boxinstseg.

Aayushktyagi avatar Aayushktyagi commented on June 3, 2024

I also observed the same trend. For Boxlevelset and box2mask, performance on single class is very poor. For Boxinst its decent.
@VikasRajashekar did you try BoxLevelset?

from boxinstseg.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.