Giter VIP home page Giter VIP logo

Comments (3)

princewang1994 avatar princewang1994 commented on August 17, 2024

I fixed this problem by modify a few lines here

bug version(original):

# skip j = 0, because it's the background class
for j in xrange(1, imdb.num_classes):
    inds = np.where(scores[:, j] > thresh)[0]
    cls_scores = scores[inds, j]
    cls_boxes = boxes[inds, j * 4:(j + 1) * 4]
    cls_dets = np.hstack((cls_boxes, cls_scores[:, np.newaxis])) \
    .astype(np.float32, copy=False)
    keep = nms(cls_dets, cfg.TEST.NMS)
    cls_dets = cls_dets[keep, :]
    if vis:
        im2show = vis_detections(im2show, imdb.classes[j], cls_dets)
        all_boxes[j][i] = cls_dets

after fixed:

for j in xrange(1, imdb.num_classes):
    inds = np.where(scores[:, j] > thresh)[0]
    cls_scores = scores[inds, j]
    fg = int(j > 0) # class should be agnostic
    cls_boxes = boxes[inds, fg * 4:(fg + 1) * 4]
    cls_dets = np.hstack((cls_boxes, cls_scores[:, np.newaxis])) \
    .astype(np.float32, copy=False)
    keep = nms(cls_dets, cfg.TEST.NMS)
    cls_dets = cls_dets[keep, :]
    if vis:
        im2show = vis_detections(im2show, imdb.classes[j], cls_dets)
        all_boxes[j][i] = cls_dets

hope this helpful

from pytorch_rfcn.

lxtGH avatar lxtGH commented on August 17, 2024

Hi! thanks for reply, what is your result of the your model @princewang1994

from pytorch_rfcn.

princewang1994 avatar princewang1994 commented on August 17, 2024

I got about 0.36 mAP by running train.py directly, it seems that R-FCN's structure in these repo is not the same as that in original paper such as the size of feature map in resnet stage-5. After enlarge the size of stage-5, mAP reached about 49.5, which is also poor ==.

from pytorch_rfcn.

Related Issues (6)

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.