Git Product home page Git Product logo

Comments (20)

pengsida avatar pengsida commented on August 16, 2024

你说的是哪个数据集

from snake.

huaze555 avatar huaze555 commented on August 16, 2024

@pengsida 跑的kins,我发现代码里,不管原始图片尺寸是多少,都会变换到896*384,为什么选择这个尺寸呢? 可以任意换成别的能被32整除的数吗? 其中有啥trick能分享一下吗? 谢谢!

from snake.

pengsida avatar pengsida commented on August 16, 2024
  1. 训练的时候用384 x 896,是因为kitti的图片大小是375 x 1242,我是对图片做random crop的。
  2. 可以根据375 x 1242换成其他h x w,但要考虑显存。一般crop大一些,图片内容更多,训得快一些。
  3. kitti的detection,multi-scale training挺重要的,测试的时候要把图片放大,效果会好很多。

from snake.

huaze555 avatar huaze555 commented on August 16, 2024

@pengsida 非常感谢你的指导!
我的数据集图片在1000 * 600左右的分辨率,我设置网络输入为960*544,这样是不是太浪费并且对训练效果也没多大帮助?
测试时把图片放大,效果会好很多,但耗时也高了。我想训练出来的模型比较小,且inference速度快,我是不是应该选择把网络输入改小一点尺寸,同时测试时,把测试图片缩小点以提升速度?

from snake.

pengsida avatar pengsida commented on August 16, 2024
  1. 960*544差不多吧,训练时显存放得下的话,图片越大越好呀。你可能要调调multi-scale training的参数。
  2. kitti图片里的物体特别小所以需要放大,不知道你数据集物体的大小。测试时,你可以调图片大小,得到你自己满意的trade-off between accuracy and speed.

from snake.

huaze555 avatar huaze555 commented on August 16, 2024

@pengsida 我的数据集物体尺寸比较大,所以感觉不需要放大。
1, multi-scale training的参数,在哪里调呢?
2, 我看kin_snake_yaml文件里 network: 'ro_34',我可以选择‘dla_34’吗,这两个网络哪个更好点?

from snake.

pengsida avatar pengsida commented on August 16, 2024

我明天回复你。

from snake.

pengsida avatar pengsida commented on August 16, 2024
  1. https://github.com/zju3dv/snake/blob/master/lib/utils/snake/snake_kins_utils.py#L19
  2. ro_34dla_34都用了dla的网络,只是配置稍有不同。ro_34更好一些。

from snake.

huaze555 avatar huaze555 commented on August 16, 2024

@pengsida 谢谢你!
还有一个问题,下载的训练好的模型149.pth是109兆,我想训练自己的数据得到得模型更小点,比如50兆,有啥方法能实现吗?

from snake.

pengsida avatar pengsida commented on August 16, 2024

需要换小一些的网络。

from snake.

pengsida avatar pengsida commented on August 16, 2024

149.pth包括了optimizer的参数,实际网络模型没有109m。

from snake.

huaze555 avatar huaze555 commented on August 16, 2024

@pengsida
1 我看了下149pth,里面只有‘net’和‘epoch’,共107.9兆
2 换小一点得网络,是只换backbone还是?

from snake.

pengsida avatar pengsida commented on August 16, 2024

只换backbone,主要是backbone比较大。还可以减少deformation iteration的数量。

from snake.

huaze555 avatar huaze555 commented on August 16, 2024

@pengsida
1 只换backbone的话,在你的代码里可以通过参数选择别的小点的backbone吗?
2 减少deformation iteration的数量,在代码哪里设置?

可能问题有点小白,还请大神指导~

from snake.

pengsida avatar pengsida commented on August 16, 2024
  1. 我的代码里没有提供可选的参数来选择backbone,因为我一直用的是dla。backbone是这个https://github.com/zju3dv/snake/blob/master/lib/networks/snake/ct_snake.py#L13 换backbone你可以参考CenterNet是怎么用不同网络做backbone的。
  2. https://github.com/zju3dv/snake/blob/master/lib/networks/snake/evolve.py#L15

from snake.

huaze555 avatar huaze555 commented on August 16, 2024

@pengsida 非常感谢!

from snake.

huaze555 avatar huaze555 commented on August 16, 2024

@pengsida 大神你好,我又来了~
用训练好的模型做inference时,dla34-ba72cf86.pth 这个也必须需要加载吗?

from snake.

pengsida avatar pengsida commented on August 16, 2024

不需要

from snake.

huaze555 avatar huaze555 commented on August 16, 2024

@pengsida
训练好了模型,想做一个c++的demo做inference,有啥好的方式实现吗?
1 用opencv加载这个pytorch模型
2 先转onnx,再做后续c++
3 用pytorch官方推出的c++接口
大神觉得哪个方式方便?或者有更好的方式吗?求指导~

from snake.

pengsida avatar pengsida commented on August 16, 2024

我没有用c++做过network inference,所以不知道。

from snake.

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.