-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
Yolov5s versus Yolov5s-cls #13128
Comments
@breannashi hello, Thank you for reaching out and for your detailed question! To address your query, the Here are a few points to consider:
If you are experiencing a drop in performance with If you could provide a minimum reproducible code example, it would help us investigate the issue more effectively. You can refer to our minimum reproducible example guide for more details on how to create one. Feel free to share any additional details or code snippets that might help us understand the issue better. |
Could you point me to the data processing steps used in the object detection mode for classification. For example, I was to ensure my cropping is consistent across the two versions of the sets. |
Hello @breannashi, Thank you for your question! Ensuring consistent data processing between object detection and classification tasks is crucial for achieving reliable results. For object detection with
For classification with
To ensure consistency between the two, you can follow these steps:
Here is a sample code snippet to illustrate the cropping and resizing process: from PIL import Image
import numpy as np
def crop_and_resize(image, bbox, target_size=(224, 224)):
# Crop the image using the bounding box
cropped_image = image.crop((bbox[0], bbox[1], bbox[2], bbox[3]))
# Resize the cropped image to the target size
resized_image = cropped_image.resize(target_size, Image.ANTIALIAS)
# Normalize the image (example normalization)
normalized_image = np.array(resized_image) / 255.0
return normalized_image
# Example usage
image = Image.open('path_to_image.jpg')
bbox = [xmin, ymin, xmax, ymax] # Bounding box coordinates
processed_image = crop_and_resize(image, bbox) If you haven't already, please ensure you are using the latest versions of For more detailed guidance on data processing and training, you can refer to our Tips for Best Training Results. If you encounter any issues or have further questions, feel free to share a minimum reproducible code example. This will help us investigate and provide more accurate assistance. You can find more details on how to create one here. Best of luck with your project! 🚀 |
👋 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
Question
I am creating a semi-automatic pipeline that chains object detections from yolov5 back in to the yolov5-cls (just the classifier) to enhance rare class detection, but the results are showing some drop in performance on the yolov5-cls but overall improvement. should the yolov5s-cls and the yolov5s produce identical results (for classification)? or are their some performance differences?
Additional
I ran yolov5s and yolov5-cls on the same data (cropped bounding boxes for the classifier) and received diffrent results.
The text was updated successfully, but these errors were encountered: