-
-
Notifications
You must be signed in to change notification settings - Fork 15.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
val.py csv file outputting feature for comparison of a model performance along different test datasets #11446
Comments
👋 Hello @CemEntok, 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. RequirementsPython>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started: git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install EnvironmentsYOLOv5 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 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. Introducing YOLOv8 🚀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 |
Hello @CemEntok, Thank you for your request. We appreciate your interest in improving YOLOv8. We can definitely consider implementing the feature you have requested, however, we need more information from you regarding the "continuous data" output you are suggesting. Could you please provide us with more details? Examples or diagrams would be really helpful. Looking forward to hearing back from you! |
Looks like there is a function in plots.py file which can help compare metrics of different training schedules: def plot_results(file='path/to/results.csv', dir=''):
# Plot training results.csv. Usage: from utils.plots import *; plot_results('path/to/results.csv')
save_dir = Path(file).parent if file else Path(dir)
fig, ax = plt.subplots(2, 5, figsize=(12, 6), tight_layout=True)
ax = ax.ravel()
files = list(save_dir.glob('results*.csv'))
assert len(files), f'No results.csv files found in {save_dir.resolve()}, nothing to plot.'
for f in files:
try:
data = pd.read_csv(f)
s = [x.strip() for x in data.columns]
x = data.values[:, 0]
for i, j in enumerate([1, 2, 3, 4, 5, 8, 9, 10, 6, 7]):
y = data.values[:, j].astype('float')
# y[y == 0] = np.nan # don't show zero values
ax[i].plot(x, y, marker='.', label=f.stem, linewidth=2, markersize=8)
ax[i].set_title(s[j], fontsize=12)
# if j in [8, 9, 10]: # share train and val loss y axes
# ax[i].get_shared_y_axes().join(ax[i], ax[i - 5])
except Exception as e:
LOGGER.info(f'Warning: Plotting error for {f}: {e}')
ax[1].legend()
fig.savefig(save_dir / 'results.png', dpi=200)
plt.close() |
Hello @CemEntok, Have you tried using the However, if you still wish to get the datapoints of the plots captured instead of a .png file output, you may want to consider modifying the Hope this helps! Let us know if you have further questions. |
Hello @glenn-jocher, I hope this message finds you well. I am currently working with YOLOv8 for object detection tasks, and I've come across your discussions related to saving validation and testing results as .csv files. I find this approach quite useful for post-processing and analysis. I would greatly appreciate it if you could provide some guidance on how to implement this feature. Specifically, I'm interested in understanding how I can modify the code to capture prediction results during validation and testing and then save them into a .csv file format. I've gone through the codebase, but I'm unsure about the best way to extract the necessary information and structure it for CSV output. If you could share some code snippets, pointers, or steps to follow, I would be extremely grateful. Your insights would undoubtedly help me and the community better understand and utilize this functionality within YOLOv8. Thank you for your time and expertise. Looking forward to your response. Best regards, |
here just for training as .csv @threaded
@plt_settings()
|
@abdalluhahmed hi there, I see that you are working on a function called From the code, it seems like the function first converts the input tensors to numpy arrays and then builds the image grid. It resizes the images if the size exceeds the maximum limit and annotates the images with labels, boxes, masks, and keypoints. Finally, it saves the annotated grid as an image file. The code looks well-implemented, and it seems to cover various use cases such as plotting bounding boxes, masks, and keypoints. However, if you have any specific issue or question regarding this code or if you need any further assistance, please let me know. Thank you! |
Search before asking
Description
Is it possible to add a feature to output metric values as continuous data when val.py code is run?
Use case
By having this, it would be possible to compare metric outputs of a model for different test datasets, but in current metric outputting, only images are outputted which makes comparison of performance of a model for different datasets harder.
Additional
Thank you
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: