Skip to content
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

drone resolutions for input yolov5 #13529

Open
1 task done
pepsodent72 opened this issue Mar 10, 2025 · 2 comments
Open
1 task done

drone resolutions for input yolov5 #13529

pepsodent72 opened this issue Mar 10, 2025 · 2 comments
Labels
detect Object Detection issues, PR's question Further information is requested

Comments

@pepsodent72
Copy link

Search before asking

Question

halo

I am using a drone and trying to detect rice fields using yolov5. after successfully detecting the segmentation, I used the Ground Sampling Distance method to calculate the area of the rice field segmentation based on the number of pixels. my problem now is that the drone image input is about 20MP, but I have tried yolov5 and resized it automatically to 3008 x 2272 pixels. is there any suggestion for yolo to maintain the number of 20 mp pixels?

please ask for the answer from the professionals, thank you good health always

Additional

No response

@pepsodent72 pepsodent72 added the question Further information is requested label Mar 10, 2025
@UltralyticsAssistant UltralyticsAssistant added the detect Object Detection issues, PR's label Mar 10, 2025
@UltralyticsAssistant
Copy link
Member

👋 Hello @pepsodent72, 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 or implementation ❓ Question, such as your scenario involving drone imagery and high-resolution input, please provide as much detail as possible, including:

  • Example drone images or data (if shareable)
  • Any specific YOLOv5 configuration or preprocessing steps you are using
  • Logs or output details during your tests
  • How resizing is being handled or any relevant code snippets

Additionally, it is worth noting that YOLOv5 automatically resizes inputs to the model's default training resolution. To work with high-resolution images (like 20MP), you may need to experiment with custom input sizes by modifying the --img parameter during training or inference. This could have implications on memory usage and performance, so adjustments may be necessary.

Requirements

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

Environments

YOLOv5 can be run in various environments, including:

Status

YOLOv5 CI

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.

This is an automated response to help guide you. An Ultralytics engineer will assist you further as soon as possible. Let us know if you have additional details to share in the meantime! 😊

@pderrenger
Copy link
Member

@pepsodent72 for drone imagery at native 20MP resolution, we recommend:

  1. Tile Inference: Split large images into smaller tiles (e.g., 640x640) using sliding window detection. This maintains original resolution while accommodating YOLOv5's default input size. Example:
model = torch.hub.load('ultralytics/yolov5', 'yolov5s')
results = model('large_image.jpg', tile=512)  # tile size 512
  1. Adjust Input Size: Train with higher resolution using --img argument (requires retraining):
python train.py --img 1280  # maximum size depends on GPU memory
  1. Verify GSD Calibration: Ensure your Ground Sampling Distance calculations account for drone altitude and sensor specs, as demonstrated in our AI in agriculture solutions.

For commercial deployments requiring high-res processing, consider an Ultralytics Enterprise License for optimized large-scale implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detect Object Detection issues, PR's question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants