Closed vishal3046 closed 6 months ago
π Hello @vishal3046, thank you for your interest in YOLOv5 π! Please visit our βοΈ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.
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.
Python>=3.8.0 with all requirements.txt installed including PyTorch>=1.8. To get started:
git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install
YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training, validation, inference, export and benchmarks on macOS, Windows, and Ubuntu every 24 hours and on every commit.
We're excited to announce the launch of our latest state-of-the-art (SOTA) object detection model for 2023 - YOLOv8 π!
Designed to be fast, accurate, and easy to use, YOLOv8 is an ideal choice for a wide range of object detection, image segmentation and image classification tasks. With YOLOv8, you'll be able to quickly and accurately detect objects in real-time, streamline your workflows, and achieve new levels of accuracy in your projects.
Check out our YOLOv8 Docs for details and get started with:
pip install ultralytics
@vishal3046 hi there! It seems like you're encountering significant RAM usage issues during your project, especially with larger image datasets. High RAM usage usually comes from loading a large number of images into memory at once or performing resource-intensive operations on them.
Considering you're working with a variable number of images (12k, 10k, and 4k) and using data augmentation, it's vital to manage memory efficiently. Here are a couple of suggestions:
gc.collect()
from Python's gc
module if necessary.Given the complexity of the transformation you're doing, especially with DICOM images, high memory usage can occur, especially with higher resolutions or large datasets. If the issue persists, consider processing images in a lower resolution or optimizing your pipeline further to reduce memory footprint.
Feel free to share specific details or error messages you encounter, and we can dive deeper into this issue together. Keep exploring and optimizing! π
π Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.
For additional resources and information, please see the links below:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!
Thank you for your contributions to YOLO π and Vision AI β
Search before asking
YOLOv5 Component
No response
Bug
https://www.kaggle.com/code/vishalb19mia1012/vindr-yolo
please refer this notebook
While executing the 12k and 10k there are issues where my ram usage goes to the peak and my notebook crashes and the list of warnings are very new as well
but if i do the same for 4k-test-640 the code is running
idk what im dong wrong here im been stuck for 2 weeks please help
and here the number basically means the number of images ill share the code how the images are generated as well im doing some preprocessing
from PIL import Image import matplotlib.pyplot as plt import albumentations as A import numpy as np import os import zipfile import pydicom import cv2 import matplotlib.patches as patches from math import isnan
zip_file_path = 'D:\Python files\yolo_breast_cancer\vindr-mammo-a-large-scale-benchmark-dataset-for-computer-aided-detection-and-diagnosis-in-full-field-digital-mammography-1.0.0.zip'
def load_and_transform_dicom_image(zip_file_path, study_id, image_id, output_image_dir, output_label_dir, original_bounding_boxes, image_number): try: with zipfile.ZipFile(zip_file_path, 'r') as zip_ref: with zip_ref.open(f'vindr-mammo-a-large-scale-benchmark-dataset-for-computer-aided-detection-and-diagnosis-in-full-field-digital-mammography-1.0.0/images/{study_id}/{image_id}.dicom') as file: ds = pydicom.dcmread(file)
def display_image_dimensions(transformed_image): height, width = transformed_image.shape[:2] print(f"Transformed Image Dimensions: Height={height}, Width={width}")
def convert_to_yolo_format(image_width, image_height, bbox): x_min, y_min, x_max, y_max, class_label = bbox center_x = (x_min + x_max) / 2 center_y = (y_min + y_max) / 2 width = x_max - x_min height = y_max - y_min center_x /= image_width center_y /= image_height width /= image_width height /= image_height return f"{class_label} {center_x} {center_y} {width} {height}"
error_images = [] image_number_counter = 1
for _, row in dataset_new.iterrows(): study_id = row['study_id'] image_id = row['image_id'] if row['classification'] == 'Malignant': class_label = 1 else: class_label = 0
print("Study ID and Image ID pairs for images with ValueError:", error_images)
Environment
No response
Minimal Reproducible Example
No response
Additional
No response
Are you willing to submit a PR?