GithubHelp home page GithubHelp logo

Comments (9)

sidml avatar sidml commented on May 24, 2024 1

@cartvector You may try to reduce the anchor base size. It may fix the issue.
You may go to simple-faster-rcnn-pytorch-master\model\utils\bbox_tools.py and look for generate_anchor_base function. The default value for base_size is 16. You may want to reduce it to 4 or 8.

from simple-faster-rcnn-pytorch.

joeybose avatar joeybose commented on May 24, 2024

This also corresponds with no anchors inside the image? I.e. inside_index is 0 in line 206 in creator_tool.py. Maybe for this special case clipping the anchors to image size is the way to go?

from simple-faster-rcnn-pytorch.

chenyuntc avatar chenyuntc commented on May 24, 2024

Maybe adjust anchor size to fit your dataset? And could it be that the bbox instead of anchor is empty?

Btw, I suggest you to run it in IPython with %run. Then when it interrupt, you can go into the code that breaks with %debug.

from simple-faster-rcnn-pytorch.

joeybose avatar joeybose commented on May 24, 2024

So I clipped the anchors whenever inside_index returns 0 and now it trains atleast. But I think this is a small bug regardless as if none of your anchors are inside the image something should be done.

from simple-faster-rcnn-pytorch.

chenyuntc avatar chenyuntc commented on May 24, 2024

ious = bbox_iou(anchor, bbox)
argmax_ious = ious.argmax(axis=1)

I think it seems more likely that the bbox is mepty.

from simple-faster-rcnn-pytorch.

cramaiah avatar cramaiah commented on May 24, 2024

@joeybose How did you clip the anchors?

from simple-faster-rcnn-pytorch.

joeybose avatar joeybose commented on May 24, 2024

It's been a while so I can't remember the exact solution anymore. But I have a fork of this repo which kinda works so maybe look there?

from simple-faster-rcnn-pytorch.

cartvector avatar cartvector commented on May 24, 2024

@chenyuntc I debug this project in pycharm,this problem happened:
"ValueError: attempt to get argmax of an empty sequence"
in "ious = bbox_iou(anchor, bbox)
argmax_ious = ious.argmax(axis=1)
max_ious = ious[np.arange(len(inside_index)), argmax_ious]"
What can I do to solve this problem?

from simple-faster-rcnn-pytorch.

cartvector avatar cartvector commented on May 24, 2024

it works! thank you @sidml

from simple-faster-rcnn-pytorch.

Related Issues (20)

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.