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

Information needed for university project with yolov5 #13496

Open
1 task done
SDK1410 opened this issue Jan 22, 2025 · 2 comments
Open
1 task done

Information needed for university project with yolov5 #13496

SDK1410 opened this issue Jan 22, 2025 · 2 comments
Labels
question Further information is requested

Comments

@SDK1410
Copy link

SDK1410 commented Jan 22, 2025

Search before asking

Question

Greetings.
I am using a pretrained yolov5s model for lung nodules detection for a university project.
I need to provide some basic information about the yolov5 model such as what are the standard "activation functions (in hidden & output layers)" and what type of "optimizer" is used.
Furthermore, how many layers and neurons are used per layer?
I have found some answers to this questions but they are not from reliable sources. So i cannot use them for my scientific paper, as i do not know if the provided information are correct.

Hope you can help me out.
Thank you in advance!

Additional

No response

@SDK1410 SDK1410 added the question Further information is requested label Jan 22, 2025
@UltralyticsAssistant
Copy link
Member

👋 Hello @SDK1410, thank you for your interest in YOLOv5 🚀! It's exciting to see YOLOv5 being utilized for a university project on lung nodule detection. Here's how you can proceed:

For detailed architecture-related questions like the ones you've asked (e.g., activation functions, optimizer types, layers, and neurons), we recommend exploring the YOLOv5 codebase itself for the most accurate and reliable information. The YOLOv5 model architecture and training setup are implemented in models, train.py, and utils. 📂

If you're looking to validate implementation specifics:

  1. Review the main model configuration files in the models directory. For yolov5s, specifically look at yolov5s.yaml.
  2. Check the training-related details in the train.py script, especially optimizer configurations and learning rate schedules.

If this is a 🐛 Bug Report, please provide a minimum reproducible example (MRE) to help us debug it effectively.

If this is a ❓ Question requiring further clarification or validation of scientific specifics, please ensure you've provided:

  • Detailed context on what you've reviewed so far.
  • Relevant examples or outputs from any experiments conducted using YOLOv5.

Resources

For further guidance, check out these helpful links:

Requirements

Ensure your environment is set up correctly:
Python>=3.8.0 with all requirements.txt installed including PyTorch>=1.8. Use the following commands to get started:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

Verified Environments

For quick experimentation, YOLOv5 can be run in these verified environments, fully pre-configured with dependencies:

Status

If the YOLOv5 CI badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are passing. These tests verify correct operation of all tasks including training, validation, inference, export, and benchmarks.

🤖 This is an automated response to assist you as quickly as possible. An Ultralytics engineer will respond soon to provide further details or assistance!

@pderrenger
Copy link
Member

@SDK1410 thank you for your detailed question!

The YOLOv5 model uses the Leaky ReLU activation function in its hidden layers and a Sigmoid activation function for the output layer in object detection tasks. Regarding the optimizer, YOLOv5 typically uses the SGD (Stochastic Gradient Descent) optimizer by default, but Adam is also supported and commonly used depending on the training configuration.

For specific details like the number of layers and neurons per layer, you can analyze the model directly using the model.info() method in YOLOv5. Here's an example:

from ultralytics import YOLO
model = YOLO('yolov5s.pt')  # Load pretrained YOLOv5s model
model.info(detailed=True)   # Prints detailed layer and parameter information

This will give you a comprehensive breakdown of the network architecture. For further technical details, I recommend referencing the YOLOv5 repository or the official Ultralytics documentation. Good luck with your project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants