-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System RAM not getting properly released #12704
Comments
👋 Hello @muhammad-baqir-410, thank you for your interest in Ultralytics YOLOv8 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered. If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it. If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results. Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users. InstallPip install the pip install ultralytics EnvironmentsYOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit. |
Hello, i have the same error when i try run a simple YOLOv8 inference on my PC. When tried received a segmentation fault error, being that i have memory. Below my error:
and the htop view while the script is run: Someone help us, i need run this YOLOv8 model. Thank you everyone |
Hello! It seems like you're encountering a segmentation fault which could be due to a variety of reasons — this type of error often relates to accessing memory that isn't valid or incorrectly managing resources. Here are a few suggestions to help resolve this issue:
If these steps don't resolve the issue, consider sharing more details such as the code snippet you're using for inference. This might provide more insight into what might be going wrong. Hope this helps! 🚀 |
Search before asking
YOLOv8 Component
Predict, Other
Bug
The system RAM is not released even after dereferencing the model instance, using a garbage collector, and even using a context manager. Here is the system RAM usage before and after loading the model and after deleting the model instance:
Memory Usage Before Loading the Model:
System RAM - Total: 31.22 GB
System RAM - Used: 14.97 GB
System RAM - Available: 15.41 GB
System RAM - Usage Percentage: 50.6%
GPU - Allocated: 0.00 GB
GPU - Cached: 0.00 GB
WARNING⚠️ 'source' is missing. Using 'source=/home/user/anaconda3/envs/yolov8/lib/python3.11/site-packages/ultralytics/assets'.
image 1/2 /home/user/anaconda3/envs/yolov8/lib/python3.11/site-packages/ultralytics/assets/bus.jpg: 640x480 4 persons, 1 bus, 1 stop sign, 78.1ms
image 2/2 /home/user/anaconda3/envs/yolov8/lib/python3.11/site-packages/ultralytics/assets/zidane.jpg: 384x640 2 persons, 1 tie, 79.3ms
Speed: 2.0ms preprocess, 78.7ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)
Memory Usage After Loading the Model:
System RAM - Total: 31.22 GB
System RAM - Used: 16.72 GB
System RAM - Available: 13.65 GB
System RAM - Usage Percentage: 56.3%
GPU - Allocated: 0.04 GB
GPU - Cached: 0.09 GB
Memory Usage After Deleting the Model:
System RAM - Total: 31.22 GB
System RAM - Used: 16.72 GB
System RAM - Available: 13.65 GB
System RAM - Usage Percentage: 56.3%
GPU - Allocated: 0.04 GB
GPU - Cached: 0.06 GB
Environment
Minimal Reproducible Example
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: