Giter Site home page Giter Site logo

您好,请问我在运行detect.py时设置不同尺度输入进行测试,为什么net forword time没有变化 about pytorch_retinaface HOT 6 CLOSED

yjhuasheng avatar yjhuasheng commented on May 19, 2024
您好,请问我在运行detect.py时设置不同尺度输入进行测试,为什么net forword time没有变化

from pytorch_retinaface.

Comments (6)

biubug6 avatar biubug6 commented on May 19, 2024

一般是由于网络比较小, 一定尺度范围内的图像,一次前向过程中,GPU的核心计算单元并没有被用完导致时间消耗没有增加

from pytorch_retinaface.

yjhuasheng avatar yjhuasheng commented on May 19, 2024

我分别测的320x240,480x640,720x1280,1280x1920尺度的前向过程的时间,我是直接resiez的,可是时间还是很相近都是8ms,这是什么原因呢?

from pytorch_retinaface.

biubug6 avatar biubug6 commented on May 19, 2024

建议你打印出送入网络之前的shape, 我在GTX1070上测试, 时间与送入网络的尺度成正相关.

from pytorch_retinaface.

yjhuasheng avatar yjhuasheng commented on May 19, 2024

好的,我打印看看

from pytorch_retinaface.

yjhuasheng avatar yjhuasheng commented on May 19, 2024

我打印出来了,还是这样的结果,测试的时候是单张图像循环测试100次,然后计算平均的前向时间,不同尺度的平均时间还是很相近,
torch.Size([1, 3, 1280, 720])
net forward time: 0.0141
torch.Size([1, 3, 1280, 720])
net forward time: 0.0149
ave_time: 0.02009380340576172

torch.Size([1, 3, 640, 480])
net forward time: 0.0130
torch.Size([1, 3, 640, 480])
net forward time: 0.0125
ave_time: 0.019301908016204836

torch.Size([1, 3, 1920, 1080])
net forward time: 0.0140
torch.Size([1, 3, 1920, 1080])
net forward time: 0.0132
ave_time: 0.02022948145866394

from pytorch_retinaface.

Govan111 avatar Govan111 commented on May 19, 2024

请问找到原因了吗?为什么不同尺度的平均时间还是很相近,我用256*256尺寸的图片也需要14ms

from pytorch_retinaface.

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.