Comments (9)
from open-groundingdino.
Hi, @formance, plz make sure you build the CUDA ops following the README.md :
pip install -r requirements.txt
cd models/GroundingDINO/ops
python setup.py build install
# unit test (should see all checking is True)
python test.py
from open-groundingdino.
Hi, @formance, plz make sure you build the CUDA ops following the README.md :
pip install -r requirements.txt cd models/GroundingDINO/ops python setup.py build install # unit test (should see all checking is True) python test.py
i have done this step,
but in unit test, cuda out of memory
environment: pytorch 2.0.1, cuda 11.7, python 3.10.11
from open-groundingdino.
Hi, @formance, glad to hear you compiled it successfully.
this test.py
file will test ops for channels 30 to 3096:
Open-GroundingDino/models/GroundingDINO/ops/test.py
Lines 81 to 86 in 9036724
According to your log, 30, 32, 64, 71, and 1025 can all run normally. So maybe the error is caused by the fact that RTX4090 only has 20G GPU memory and V100 has 32G memory. It seems that your operator was compiled successfully, you can continue to try the following steps to see if everything works properly.
from open-groundingdino.
Hi, @formance, glad to hear you compiled it successfully.
this
test.py
file will test ops for channels 30 to 3096:Open-GroundingDino/models/GroundingDINO/ops/test.py
Lines 81 to 86 in 9036724
According to your log, 30, 32, 64, 71, and 1025 can all run normally. So maybe the error is caused by the fact that RTX4090 only has 20G GPU memory and V100 has 32G memory. It seems that your operator was compiled successfully, you can continue to try the following steps to see if everything works properly.
then why erro occured when training
from open-groundingdino.
# your .bashrc file
export CUDA_HOME=/usr/local/cuda-11.8
export PATH=/usr/local/cuda-11.8/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH
🛠️ Install
Note:
- If you have a CUDA environment, please make sure the environment variable
CUDA_HOME
is set. It will be compiled under CPU-only mode if no CUDA available.
Please make sure following the installation steps strictly, otherwise the program may produce:
NameError: name '_C' is not defined
If this happened, please reinstalled the groundingDINO by reclone the git and do all the installation steps again.
how to check cuda:
echo $CUDA_HOME
If it print nothing, then it means you haven't set up the path/
Run this so the environment variable will be set under current shell.
export CUDA_HOME=/path/to/cuda-11.3
Notice the version of cuda should be aligned with your CUDA runtime, for there might exists multiple cuda at the same time.
If you want to set the CUDA_HOME permanently, store it using:
echo 'export CUDA_HOME=/path/to/cuda' >> ~/.bashrc
after that, source the bashrc file and check CUDA_HOME:
source ~/.bashrc
echo $CUDA_HOME
In this example, /path/to/cuda-11.3 should be replaced with the path where your CUDA toolkit is installed. You can find this by typing which nvcc in your terminal:
For instance,
if the output is /usr/local/cuda/bin/nvcc, then:
export CUDA_HOME=/usr/local/cuda
from open-groundingdino.
# your .bashrc file export CUDA_HOME=/usr/local/cuda-11.8 export PATH=/usr/local/cuda-11.8/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH🛠️ Install
Note:
- If you have a CUDA environment, please make sure the environment variable
CUDA_HOME
is set. It will be compiled under CPU-only mode if no CUDA available.Please make sure following the installation steps strictly, otherwise the program may produce:
NameError: name '_C' is not defined
If this happened, please reinstalled the groundingDINO by reclone the git and do all the installation steps again.
how to check cuda:
echo $CUDA_HOMEIf it print nothing, then it means you haven't set up the path/
Run this so the environment variable will be set under current shell.
export CUDA_HOME=/path/to/cuda-11.3
Notice the version of cuda should be aligned with your CUDA runtime, for there might exists multiple cuda at the same time.
If you want to set the CUDA_HOME permanently, store it using:
echo 'export CUDA_HOME=/path/to/cuda' >> ~/.bashrcafter that, source the bashrc file and check CUDA_HOME:
source ~/.bashrc echo $CUDA_HOMEIn this example, /path/to/cuda-11.3 should be replaced with the path where your CUDA toolkit is installed. You can find this by typing which nvcc in your terminal:
For instance, if the output is /usr/local/cuda/bin/nvcc, then:
export CUDA_HOME=/usr/local/cuda
i hava done this, but same error occured. maybe i know why.
the installed module name is not groundingdino._C ,is MultiScaleDeformableAttention
i think u should fix it.
from open-groundingdino.
This PR fixed this issue
from open-groundingdino.
thanks.
from open-groundingdino.
Related Issues (20)
- Referring expression comprehension TASK?
- Issue in Setup of the code
- Inference device problem
- 训练过程中有关bbox的报错
- is bbox annotation required?
- 在object365数据集上训练处理text prompt 太长的问题 HOT 2
- BERT HOT 1
- 我应该怎么训练自己的数据集 HOT 1
- 如何从头开始预训练模型 HOT 1
- 碰到一个非常头疼的问题,根据odvg的数据集格式自制了一个数据集,一万多张图,配置好了可以进行训练,但是训练过程中一直没有精度,特别低总是0.00几,跑了几十个epoch也是这样,谁有碰到类似的情况吗?球球了,帮帮忙,跪谢跪谢! HOT 3
- I need to share multiple GPUs on a server with my colleagues, so how do I specify which GPUs to use for training when I am using them? HOT 1
- torch.cuda.OutOfMemoryError: CUDA out of memory
- I try to get AP per class. And I have 14 categories, Why does it output only 12 category AP? HOT 1
- VG数据集格式 HOT 1
- 模型训练结果后标签识别错误
- Training models on custom data sets, some questions!
- 验证部分的代码是不是有问题?我的验证集mAP全部显示为-1 HOT 2
- CUDA out of memory in the middle of fine tuning
- 请问如何finetune一个自定义的类别,需要修改哪些配置?
- Best boundingbox in output (by order or by confidence)
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 open-groundingdino.