Comments (6)
It happened to me when running some tools from the DensePose project that it always tried to compile the model using CUDA, which I don't have installed because I'm running some experiments on MacOS.
If you want to use CPU for inference you can add the option MODEL.DEVICE cpu
to the command you are running, or add that same setting in the configuration file you are using:
MODEL:
DEVICE: "cpu"
from detectron2.
I also have the same error on my MacOS, please how i can use the command MODEL.DEVICE cpu or where should i write to the config file , thank you!
Check https://detectron2.readthedocs.io/tutorials/getting_started.html#inference-with-pre-trained-models i.e. in order to run inference on cpu
python demo/demo.py --config-file configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml \
--input input1.jpg input2.jpg \
--opts MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl \
MODEL.DEVICE cpu
If you're talking about the error build/temp.linux-x86_64-3.7/home/harshit/PycharmProjects/detectron2/detectron2/layers/csrc/vision.o: file not recognized: file format not recognized
, then I solved it by downgrading binutils
to 2.30-5.
from detectron2.
You can install detectron2 on CPU and run inference.
If you google the error message, all occurrences of the message suggest a bug in binutils / elfutils . You may need to upgrade / downgrade your system or compiler toolchain.
from detectron2.
Thanks, it worked after downgrading binutils
.
from detectron2.
Thanks @leopiney, I was able to run it on CPU using the MODEL.DEVICE
option.
from detectron2.
I also have the same error on my MacOS, please how i can use the command MODEL.DEVICE cpu or where should i write to the config file , thank you!
from detectron2.
Related Issues (20)
- export_model.py crashes with keypoints HOT 1
- export_model.py crashes with keypoints HOT 9
- Very slow training on Apple M1 Pro HOT 2
- UnpicklingError: invalid load key, '\xef'. HOT 2
- export_model.py - list_of_lines[165] = " [1344, 1344], 1344 \n" HOT 1
- Please read & provide the following HOT 2
- The comits you are making are breaking the code!!! HOT 1
- @torch.compiler.disable - AttributeError: module 'torch' has no attribute 'compiler' HOT 7
- missing config key error HOT 2
- Please read & provide the following HOT 1
- Detectron2 about rotated object detection HOT 1
- AttributeError: Cannot find field 'gt_masks' in the given Instances! HOT 1
- DensePose的apply_net.py运行dump的选项时候,如何多gpu运行呢? HOT 1
- Encountered freezing during start training at iteration 0 HOT 2
- printing label name and bbox coordinates of predicted images
- Add device argument for multi-backends access & Ascend NPU support HOT 3
- How to convert densepose model to onnx? HOT 1
- 模型跑出来的效果超出预期
- Does this project support FCOS? HOT 1
- C++ and onnx HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from detectron2.