Giter VIP home page Giter VIP logo

ethanhe42 / softer-nms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facebookresearch/detectron

368.0 13.0 34.0 6.68 MB

Bounding Box Regression with Uncertainty for Accurate Object Detection (CVPR'19)

Home Page: https://github.com/ethanhe42/KL-Loss

License: Apache License 2.0

CMake 4.04% Makefile 0.07% Python 93.64% MATLAB 0.25% C++ 0.38% Cuda 0.23% Dockerfile 0.10% Cython 1.29%
object-detection

softer-nms's Introduction

softer-nms's People

Contributors

ir413 avatar rbgirshick avatar ashwinb avatar ethanhe42 avatar shenyunhang avatar newstzpz avatar gadcam avatar willkuhn avatar juggernaut93 avatar 103yiran avatar agrimgupta92 avatar gkioxari avatar superirabbit avatar normster avatar roytseng-tw avatar endernewton avatar wat3rbro avatar yangqing avatar daquexian avatar katotetsuro avatar silversteven avatar

Stargazers

 avatar  avatar bilzard avatar  avatar 览平科技 avatar  avatar Raslec avatar  avatar  avatar Ren Tianhe avatar Bodhi avatar  avatar  avatar  avatar hushunda avatar nin avatar Anindya Ghosal avatar Sun Aries avatar  avatar  avatar Li Binglu avatar  avatar  avatar  avatar zhangjunhua avatar Obito avatar  avatar  avatar  avatar Bruno Santos avatar  avatar  avatar Yangyi Huang avatar Lewei Lu avatar  avatar Jian Ding avatar  avatar  avatar  avatar  avatar ZuoBinhua avatar Pluto_0 avatar melon avatar jin avatar Roy avatar zzzzz avatar  avatar loveSnowBest avatar  avatar  avatar  avatar  avatar Dingyuan-Chen avatar xnnxax527 avatar Karlind avatar  avatar WangSenlin avatar Tommy avatar YangChen avatar chenle avatar xingliang lin avatar  avatar shenmayufei avatar allenpeng avatar  avatar Shijie Li avatar zlibo avatar Sean Lee avatar XiangqianMa avatar XavierFlow avatar 无 avatar huangxin avatar  avatar  avatar  avatar SylviaHolic avatar  avatar  avatar zuochongyan avatar  avatar  avatar Shengju Qian avatar xiaoyu tian avatar  avatar  avatar  avatar Frank avatar Payen Zhang(张鹏) avatar flytiger avatar  avatar  avatar Junjie Wang avatar Richard Tseng avatar 千寻 avatar  avatar ovo avatar  avatar  avatar  avatar Ruihao Chen avatar

Watchers

James Cloos avatar Aven avatar  avatar  avatar greedisgood avatar yehao avatar Lemont.Qing  avatar Amusi avatar  avatar yousongzhu avatar  avatar  avatar  avatar

softer-nms's Issues

how could I train my own dataset use your repo?

compare with e2e_faster_rcnn_R-50-FPN_1x.yaml,your init.yaml adding [PROPOSAL_FILES],so,if I train my own dataset,it could be error,and it could train well when I train coco2014 dataset,so how could I train my own dataset?

I0928 10:56:50.334882 20043 context_gpu.cu:306] Total: 306 MB
INFO train.py: 192: Loading dataset: ('bdd100k_train_detection',)
Traceback (most recent call last):
File "tools/train_net.py", line 132, in
main()
File "tools/train_net.py", line 114, in main
checkpoints = detectron.utils.train.train_model()
File "/home/test/code/softer-NMS/detectron/utils/train.py", line 58, in train_model
setup_model_for_training(model, weights_file, output_dir)
File "/home/test/code/softer-NMS/detectron/utils/train.py", line 170, in setup_model_for_training
add_model_training_inputs(model)
File "/home/test/code/softer-NMS/detectron/utils/train.py", line 194, in add_model_training_inputs
cfg.TRAIN.DATASETS, cfg.TRAIN.PROPOSAL_FILES
File "/home/test/code/softer-NMS/detectron/datasets/roidb.py", line 60, in combined_roidb_for_training
assert len(dataset_names) == len(proposal_files)
AssertionError

KL loss

image

when x_e is inaccurately, we expect L_reg will be larger,why you say it will be lower

when train on our own dataset, error occurs,

json_stats: {"accuracy_cls": 0.944484, "bbox_pred_std_abs_logw_loss": NaN, "bbox_pred_std_abs_mulw_loss": NaN, "eta": "9:15:45", "iter": 2740, "loss": NaN, "loss_bbox": NaN, "loss_cls": NaN, "loss_rpn_bbox_fpn2": NaN, "loss_rpn_bbox_fpn3": NaN, "loss_rpn_bbox_fpn4": NaN, "loss_rpn_bbox_fpn5": 0.000000, "loss_rpn_bbox_fpn6": 0.000000, "loss_rpn_cls_fpn2": NaN, "loss_rpn_cls_fpn3": NaN, "loss_rpn_cls_fpn4": NaN, "loss_rpn_cls_fpn5": 0.004753, "loss_rpn_cls_fpn6": 0.000000, "lr": 0.002500, "mb_qsize": 64, "mem": 7410, "time": 0.382141}
CRITICAL train.py: 98: Loss is NaN

what are the differences between your softer-NMS detectron version and original detectron?

several days ago,I run another repo:https://github.com/LeonJWH/detectron-cascade-rcnn-exp
this repo just upload 2 folder,config and detectron,it is clearly to let me know the structure.but how could I use your repo?where could I find the implement of softer-NMS[I think maybe in detectron folder].So,I just change the detectron folder name to detectron_nms,and when I want to train dataset,I just change the yaml file,is that true?Thanks.

How can softer-NMS be added to its own network structure?

PLEASE FOLLOW THESE INSTRUCTIONS BEFORE POSTING

  1. Please thoroughly read README.md, INSTALL.md, GETTING_STARTED.md, and FAQ.md
  2. Please search existing open and closed issues in case your issue has already been reported
  3. Please try to debug the issue in case you can solve it on your own before posting

After following steps 1-3 above and agreeing to provide the detailed information requested below, you may continue with posting your issue

(Delete this line and the text above it.)

Expected results

What did you expect to see?

Actual results

What did you observe instead?

Detailed steps to reproduce

E.g.:

The command that you ran

System information

  • Operating system: ?
  • Compiler version: ?
  • CUDA version: ?
  • cuDNN version: ?
  • NVIDIA driver version: ?
  • GPU models (for all devices if they are not all the same): ?
  • PYTHONPATH environment variable: ?
  • python --version output: ?
  • Anything else that seems relevant: ?

The final ideal goal of learned standard deviation?

Thanks for your public code and I can run in my computer!
But I actually confused about the goal of learned standard deviation...

If only use the KL loss instead of softer NMS, I think σ can accelerate the training because the value of loss func will be enlarged by its small value.
And I think the result of σ is close to 1 as possible. The reason is still unclear for me. But I think it can not influence the loss func because when σ=1, the loss func will become L1 loss and it can still train the bounding boxes. And in computing bounding box, if σ is too large, it will result in putting too much attention on one of relevant proposals and ignore others for the algorithm.

Some question about "confs"

Expected results

What did you expect to see?

what's std1 and std0 in py_cpu_nms.py?
and how could I calculate it?

Actual results

What did you observe instead?

py_cpu_nms.py::[41-42]::
std1 = confidence[i, j]
stdo = confidence[:, j]

test.py::[794-796]::
confs_j = confs[inds, j * 4:(j + 1) * 4]
nms_dets, _ = py_nms_utils.soft(dets_j,
confidence=confs_j )

test.py::[82]::
scores, boxes, cls_boxes = box_results_with_nms_and_limit(scores, boxes, confs=confs)

test.py::[67]::
scores, boxes, im_scale, confs = im_detect_bbox(
model, im, cfg.TEST.SCALE, cfg.TEST.MAX_SIZE, boxes=box_proposals
)

test.py::[176]::
confs = workspace.FetchBlob(core.ScopedName('bbox_pred_std_abs'))

what's "bbox_pred_std_abs" and what's the content of confs?

第二阶段训练后,mAP值降低了??

你好,看之前您有说道:”log的原因,这bbox_pred_std_abs_logw_loss一项可以是负值。“
但是负值训练这一项绝对loss数值越来越大,从"bbox_pred_std_abs_logw_loss": -0.083365到"bbox_pred_std_abs_logw_loss": -1.142597, 而且最后的mAP值降低了,前9万次只将XYXY项设为True时mAP为0.75。然后把所有增加项都设为True后又接着训练到18万次,mAP值却只有0.74???

谢谢!!

KL loss

In the paper, KL loss is very important, but the KL loss implementation method is not found in the code.
Thank you .

Final loss when you train your model

Hi I am trying to train a SSD using xxyy and KL loss. May I ask the final loss when you train your model using xxyy and KL loss? It seems location_loss can be a negative number, is that normal?

Detectron module

Your project is adapted based on the origin FAIR Detectron, so I directly "make" in the folder. After $make, it said "Installed /media/hh/D/softer-NMS-master
Processing dependencies for Detectron==0.0.0
Finished processing dependencies for Detectron==0.0.0".
But when I do the test "python detectron/tests/test_spatial_narrow_as_op.py",thesr is a error "File "detectron/tests/test_spatial_narrow_as_op.py", line 88, in
c2_utils.import_detectron_ops()
File "/media/XX/D/softer-NMS-master/detectron/utils/c2.py", line 43, in import_detectron_ops
detectron_ops_lib = envu.get_detectron_ops_lib()
File "/media/XX/D/softer-NMS-master/detectron/utils/env.py", line 72, in get_detectron_ops_lib
('Detectron ops lib not found; make sure that your Caffe2 '
AssertionError: Detectron ops lib not found; make sure that your Caffe2 version includes Detectron module". I tried many times, but still can not solve this problem.Is it necessary to download the source code of Detecton?

x1y1x2y2 Coordinates only in FasterRCNN head?

In softer-nms paper:

simply training with x1, y1, x2, y2 coordinates instead of the standard x, y, w, h coordinates improves the AP by 0.7%

My question is: Are x1,y1,x2,y2 coordinates used only in FasterRCNN head or both FasterRCNN and RPN heads ? The paper does not make it clear.
Hoping for your timely response:)

use for YOLO

HELLO, I want to add softer-NMS in YOLO-NMS , what should I do to change the code ? thanks.

How can softer-NMS be added to its own network structure?

PLEASE FOLLOW THESE INSTRUCTIONS BEFORE POSTING

  1. Please thoroughly read README.md, INSTALL.md, GETTING_STARTED.md, and FAQ.md
  2. Please search existing open and closed issues in case your issue has already been reported
  3. Please try to debug the issue in case you can solve it on your own before posting

After following steps 1-3 above and agreeing to provide the detailed information requested below, you may continue with posting your issue

(Delete this line and the text above it.)

Expected results

What did you expect to see?

Actual results

What did you observe instead?

Detailed steps to reproduce

E.g.:

The command that you ran

System information

  • Operating system: ?
  • Compiler version: ?
  • CUDA version: ?
  • cuDNN version: ?
  • NVIDIA driver version: ?
  • GPU models (for all devices if they are not all the same): ?
  • PYTHONPATH environment variable: ?
  • python --version output: ?
  • Anything else that seems relevant: ?

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.