GithubHelp home page GithubHelp logo

Comments (7)

siemonchan avatar siemonchan commented on June 12, 2024 2

If you are trying to use GPU, change device in create_mobilenetv3_ssd_lite_predictor to torch.device('cuda:0'), it works for me.

from mobilenetv3-ssd.

lingyi-learning avatar lingyi-learning commented on June 12, 2024

Do you solve this problem?

from mobilenetv3-ssd.

xiezhiepng avatar xiezhiepng commented on June 12, 2024

我也是同样的问题?

from mobilenetv3-ssd.

duhaijun avatar duhaijun commented on June 12, 2024

请问一下,执行run_ssd_example.py脚本报这个错该如何解决? Traceback (most recent call last):
File "run_ssd_example.py", line 57, in
boxes, labels, probs = predictor.predict(image, 10, 0.4)
File "D:\Projects\DeepLearning\MobileNetV3-SSD-master\vision\ssd\predictor.py", line 37, in predict
scores, boxes = self.net.forward(images)
File "D:\Projects\DeepLearning\MobileNetV3-SSD-master\vision\ssd\ssd.py", line 100, in forward
locations, self.priors, self.config.center_variance, self.config.size_variance
File "D:\Projects\DeepLearning\MobileNetV3-SSD-master\vision\utils\box_utils.py", line 104, in convert_locations_to_boxes
locations[..., :2] * center_variance * priors[..., 2:] + priors[..., :2],
RuntimeError: expected backend CPU and dtype Float but got backend CUDA and dtype Float

模型加载到cuda就行了

from mobilenetv3-ssd.

azhuantou avatar azhuantou commented on June 12, 2024

@siemonchan thanks

from mobilenetv3-ssd.

YONGHUICAI avatar YONGHUICAI commented on June 12, 2024

请问一下,执行run_ssd_example.py脚本报这个错该如何解决? Traceback (most recent call last):
File "run_ssd_example.py", line 57, in
boxes, labels, probs = predictor.predict(image, 10, 0.4)
File "D:\Projects\DeepLearning\MobileNetV3-SSD-master\vision\ssd\predictor.py", line 37, in predict
scores, boxes = self.net.forward(images)
File "D:\Projects\DeepLearning\MobileNetV3-SSD-master\vision\ssd\ssd.py", line 100, in forward
locations, self.priors, self.config.center_variance, self.config.size_variance
File "D:\Projects\DeepLearning\MobileNetV3-SSD-master\vision\utils\box_utils.py", line 104, in convert_locations_to_boxes
locations[..., :2] * center_variance * priors[..., 2:] + priors[..., :2],
RuntimeError: expected backend CPU and dtype Float but got backend CUDA and dtype Float

模型加载到cuda就行了

修改vision/ssd/mobilenet_v3_ssd_lite.py文件第90行成def create_mobilenetv3_ssd_lite_predictor(net, candidate_size=200, nms_method=None, sigma=0.5, device=torch.device('cuda:0'))就可以了。

from mobilenetv3-ssd.

shaoshengsong avatar shaoshengsong commented on June 12, 2024

It is recommended that git clone this version
https://github.com/shaoshengsong/MobileNetV3-SSD-Compact-Version

from mobilenetv3-ssd.

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.