Comments (3)
@BehdadSDP You're welcome! 😊 If you have any more questions or need further assistance as you implement this, feel free to reach out. Happy coding and best of luck with your project!
from yolov5.
@BehdadSDP hello 👋,
Great question! In YOLOv5, to ensure that two Dataloaders produce batches with the same images but with domain-specific differences (e.g., clear and foggy versions of the same scene), you would likely need to modify the data loading and augmentation pipeline directly. A practical approach would be to customize the LoadImagesAndLabels
class to support paired data loading. This implies that for each batch, your modified loader reads both the original and domain-transformed versions of each image and applies the exact same augmentations to both versions synchronously.
Here's a conceptual outline of what you might consider doing:
- Modify the dataset class to accept two directories (one for each domain).
- Ensure that for each batch, the class loads paired images (one from each directory).
- Apply the same augmentations to both images in the pair. This is crucial and can be achieved by ensuring the randomness in augmentations is controlled (e.g., by setting seeds) for each pair.
This approach requires a good understanding of both the YOLOv5 dataset management code and PyTorch's data handling mechanisms.
For a detailed look at YOLOv5's data loading and processing mechanisms, our documentation is always a helpful resource: https://docs.ultralytics.com/yolov5/.
I hope this sets you on the right path! Let us know how it goes.
from yolov5.
@BehdadSDP hello 👋,
Great question! In YOLOv5, to ensure that two Dataloaders produce batches with the same images but with domain-specific differences (e.g., clear and foggy versions of the same scene), you would likely need to modify the data loading and augmentation pipeline directly. A practical approach would be to customize the
LoadImagesAndLabels
class to support paired data loading. This implies that for each batch, your modified loader reads both the original and domain-transformed versions of each image and applies the exact same augmentations to both versions synchronously.Here's a conceptual outline of what you might consider doing:
- Modify the dataset class to accept two directories (one for each domain).
- Ensure that for each batch, the class loads paired images (one from each directory).
- Apply the same augmentations to both images in the pair. This is crucial and can be achieved by ensuring the randomness in augmentations is controlled (e.g., by setting seeds) for each pair.
This approach requires a good understanding of both the YOLOv5 dataset management code and PyTorch's data handling mechanisms.
For a detailed look at YOLOv5's data loading and processing mechanisms, our documentation is always a helpful resource: https://docs.ultralytics.com/yolov5/.
I hope this sets you on the right path! Let us know how it goes.
thank you so much. DONE.
from yolov5.
Related Issues (20)
- Extract feature vector from the bounding box predicted together with the coordinates and class output vector HOT 5
- augmentation in validation HOT 1
- About detect.py HOT 9
- How to close window in yolov5 detection HOT 1
- Training YoloV5n on a custom dataset, best.pt is bigger than yolov5n official size HOT 4
- Data Augmentation HOT 1
- about eval.py HOT 1
- Need advice for training a YOLOv5-obb model HOT 2
- Code doubts about the model in the detection process HOT 2
- predicting from 2D array HOT 2
- Same yolov5s training, but one over-fitting and one training is very good. HOT 2
- Hello, I have some questions about the YOLOv5 code. Could you please help me answer them? HOT 2
- Different results from train.py and val.py HOT 1
- How to change training input image size? HOT 8
- Cannot select specific coda device HOT 2
- Run yolov5 using tensor rt HOT 1
- Is it possible to add ShuffleNetV2 as backbone in the official repo? HOT 2
- Memory Error When Training YOLOv5 Using Git Bash HOT 4
- How to use tensor rt in yolov5 detection HOT 1
- resume_evolve BUG!!! HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolov5.