Code Monkey home page Code Monkey logo

Comments (5)

xingyizhou avatar xingyizhou commented on August 15, 2024

Hi,
Can you print the detailed time as in https://github.com/xingyizhou/CenterNet/blob/master/src/demo.py#L31 . The reported 19ms only includes network forwarding time, decoding time, and nms time (not applicable for centernet), as is indicated in the model zoo and following yolov3 (we move their time to after nms). This is also what we did for reporting the time for other methods. In your case, reading and resizing the image might take a lot of time, since the example images are larger than 512x512. If you really want to speedup the whole pipeline, you can use the multi-thread image pre-processing as in our testing script or use other data pre-processing library (e.g. NIVIDIA-dali) other than opencv for your application.

from centernet.

sevenseablue avatar sevenseablue commented on August 15, 2024

@xingyizhou , thank you
i print the detailed time like in the demo.py, and i got it. the upper avg 90ms is contains the load and pre time, and the first debuger new time, which consume abount 0.5 second.

debugger = Debugger(dataset=self.opt.dataset, ipynb=(self.opt.debug==3),
                        theme=self.opt.debugger_theme)

the time:

18124840932_e42b3e377c_k.jpg
tot 0.039s |load 0.007s |pre 0.007s |net 0.022s |dec 0.001s |post 0.002s |merge 0.000s |
24274813513_0cfd2ce6d0_k.jpg
tot 0.039s |load 0.007s |pre 0.007s |net 0.022s |dec 0.001s |post 0.002s |merge 0.000s |
33823288584_1d21cf0a26_k.jpg
tot 0.039s |load 0.007s |pre 0.007s |net 0.022s |dec 0.001s |post 0.002s |merge 0.000s |

the operation net , deocde, post consume abount 25ms,

my env:
ubuntu 18.04
gtx 1080 ti
cuda 10.0
pytorch 1.1

from the quora disscuss, 1080ti is 11% slower than titan xp ([https://www.quora.com/Is-the-Titan-X-better-than-the-1080-ti-for-deep-learning-and-if-so-why]). so 22ms is expceted.

is your test time like following?
net 0.017s | dec 0.001s | post 0.001s

from centernet.

xingyizhou avatar xingyizhou commented on August 15, 2024

Good. This sounds like a reasonable difference between different machines (on our machine, 1080 Ti runs at 21ms). Also, make sure that you install opencv via pip install opencv-python. I observe conda install opencv gives a slower version ......

from centernet.

xingyizhou avatar xingyizhou commented on August 15, 2024

Oh the exact time we reported in the paper is measured with test.py. demo.py also includes visualization time. You can run python test.py ctdet --load_model ../models/ctdet_coco_dla_2x.pth --keep_res for a strict re-evaluation.

from centernet.

smartwell avatar smartwell commented on August 15, 2024

@xingyizhou thanks for your great work.
win 10.0
pytorch 1.0.3
gtx 1080 ti
cuda 9.0
cudnn 7.0
my test time:
tot 0.0501s |load 0.0000s |pre 0.0175s |net 0.0286s |dec 0.0020s |post 0.0015s |merge 0.0005s |
tot 0.0506s |load 0.0000s |pre 0.0180s |net 0.0281s |dec 0.0030s |post 0.0015s |merge 0.0000s |
tot 0.0521s |load 0.0000s |pre 0.0180s |net 0.0296s |dec 0.0025s |post 0.0020s |merge 0.0000s |
tot 0.0526s |load 0.0000s |pre 0.0191s |net 0.0291s |dec 0.0025s |post 0.0015s |merge 0.0005s |
tot 0.0501s |load 0.0000s |pre 0.0175s |net 0.0286s |dec 0.0020s |post 0.0015s |merge 0.0005s |
tot 0.0496s |load 0.0000s |pre 0.0175s |net 0.0271s |dec 0.0025s |post 0.0020s |merge 0.0005s |
tot 0.0516s |load 0.0000s |pre 0.0175s |net 0.0291s |dec 0.0030s |post 0.0020s |merge 0.0000s |
tot 0.0491s |load 0.0000s |pre 0.0175s |net 0.0276s |dec 0.0025s |post 0.0015s |merge 0.0000s |
tot 0.0496s |load 0.0000s |pre 0.0170s |net 0.0281s |dec 0.0025s |post 0.0015s |merge 0.0005s |
tot 0.0506s |load 0.0000s |pre 0.0180s |net 0.0281s |dec 0.0025s |post 0.0020s |merge 0.0000s |

from centernet.

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.