Comments (5)
๐ Hello @useruser2023, thank you for your interest in YOLOv3 ๐! 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.
Requirements
Python>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started:
git clone https://github.com/ultralytics/yolov3 # clone
cd yolov3
pip install -r requirements.txt # install
Environments
YOLOv3 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
- Notebooks with free GPU:
- Google Cloud Deep Learning VM. See GCP Quickstart Guide
- Amazon Deep Learning AMI. See AWS Quickstart Guide
- Docker Image. See Docker Quickstart Guide
Status
If this badge is green, all YOLOv3 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv3 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
from yolov3.
@useruser2023 hello! Thanks for reaching out with your questions. Let's address them one by one:
-
Anchors for YOLOv3-tiny: YOLOv3-tiny uses a total of 6 anchors, with 3 used for each of the two detection layers. These anchors are predefined in the configuration file and are based on common object sizes in the training dataset. You can also recalculate them for your specific dataset using the k-means clustering method on your dataset's bounding box dimensions.
-
Dataset Creation: For creating a dataset, you should organize your images and annotations in a way that's compatible with the data loader. Annotations typically include class labels and bounding box coordinates. The Ultralytics Docs provide detailed instructions on how to format your dataset.
-
Loss Function: YOLOv3-tiny uses a combination of loss functions, including:
- Bounding Box Loss: For the coordinates of the predicted boxes (MSE loss or IoU-based loss).
- Objectness Loss: For the confidence score that an object exists within the box (Binary Cross-Entropy loss).
- Classification Loss: For the class predictions of the detected objects (Cross-Entropy loss).
The cls_head
and det_head
you're referring to are the outputs from the model's classification and detection heads, respectively. The cls_head
output is typically used for class probability predictions, while det_head
outputs are used for bounding box predictions.
For the labels_out
shape of (nl, 6), this corresponds to the label information for each bounding box in the format [batch_index, class_label, x_center, y_center, width, height]
.
I hope this helps! If you need more detailed explanations or instructions, please refer to the Ultralytics Docs. Keep up the great work with your custom YOLOv3-tiny model! ๐๐
from yolov3.
@glenn-jocher Thank you for the answer but I have a few more queries.
For the labels_out shape of (nl, 6), this corresponds to the label information for each bounding box in the format [batch_index, class_label, x_center, y_center, width, height].
- Like the
labels_out
info[batch_index, class_label, x_center, y_center, width, height]
how are the classification and detection heads infos are organized for these tensors?
# torch.Size([1, 6, 500])
# (torch.Size([1, 66, 20, 20]), torch.Size([1, 66, 10, 10]))
- Prediction
p
in ComputeLoss , isp
from classification head or detection head? - Inside ComputeLoss model is accessing different attributes
hyp
,nc
,nl
,na
. Exceptnc
I cannot access any other attributesmodel.model.na
AttributeError: 'DetectionModel' object has no attribute 'na'
. Why is that?
from yolov3.
๐ 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:
- Docs: https://docs.ultralytics.com
- HUB: https://hub.ultralytics.com
- Community: https://community.ultralytics.com
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 โญ
from yolov3.
@useruser2023 Great questions! Let's dive right in:
-
Classification and Detection Heads Info: The output tensors of the classification and detection heads include various pieces of information essential for interpreting the predictions:
- The first tensor (
torch.Size([1, 6, 500])
) could represent a specific feature map layer, depending on context (not typically YOLO output format). Usually, YOLOv3 outputs have the shape[batch_size, num_anchors * (5 + num_classes), grid_size, grid_size]
. - The two tuples (
torch.Size([1, 66, 20, 20])
andtorch.Size([1, 66, 10, 10])
) likely represent detection layers with 66 channels each. These channels include information for bounding box coordinates, objectness scores, and class probabilities. The grid sizes (20x20 and 10x10) indicate the spatial resolution at which predictions are made.
- The first tensor (
-
Prediction
p
in ComputeLoss: Thep
inComputeLoss
generally comes from the detection head, and it represents the predictions made by the model which include bounding box coordinates, objectness score, and class probabilities. -
Accessing Attributes like
hyp
,nc
,nl
,na
: In YOLOv3,nc
(number of classes),nl
(number of layers), andna
(number of anchors) are critical for defining the model's architecture and loss computation.nc
is accessible because it directly relates to the model's output dimensionality.na
(number of anchors per layer),nl
(number of detection layers), and other hyperparameters likehyp
are defined in the model configuration or training script rather than the model object itself. This is why attempting to accessmodel.model.na
might result in anAttributeError
: these are not attributes of the model class but are parameters used during model configuration and loss computation.
For accessing such attributes, you'd typically refer to the model's configuration file or the training script where these values are defined and passed to the relevant functions.
I hope this clarifies your questions! Let me know if there's anything else you're curious about. ๐
from yolov3.
Related Issues (20)
- About the instructions and code comments HOT 3
- A hopelessly long try to replicate the YOLOv3 kernel HOT 2
- Change in the anchor boxes HOT 10
- โ๏ธClosed per Code of Conduct HOT 1
- no anchor_grid in V9.6.0 yolov3.pt HOT 5
- Convert YOLOv3 dataset format to YOLOv8 HOT 3
- What's the difference between it and Yolov3 by Joseph Redmon ? HOT 7
- Integrating YOLOv8 into YOLOv3 Ultralytics HOT 2
- Seeking Advice on Equivalent YOLOv5 Variant to Standard YOLOv3 HOT 1
- Unexpectedly large trained model size (~200 MB .pt and ~400 MB .onnx) HOT 4
- Training requires much more VRAM than v5/v8 and results in ~200 MB models comparing to <15 MB models of v5/v8 HOT 5
- how to train your yolov8?
- Cannot compute loss function from best model HOT 1
- yolov3_ros input topic channel problem HOT 5
- Issue with training YOLOv3-tiny from scratch HOT 4
- yolov3.pt HOT 4
- ๅ ณไบ่ฐ็จๆจ็ไปฃ็ ๅ้ๅฐ็ไธไธไบ้ฎ้ข HOT 8
- Bug of incomplete information display HOT 2
- No module named 'ultralytics.yolo' HOT 2
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 yolov3.