Giter VIP home page Giter VIP logo

Comments (5)

github-actions avatar github-actions commented on May 27, 2024

👋 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):

Status

YOLOv3 CI

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.

glenn-jocher avatar glenn-jocher commented on May 27, 2024

@useruser2023 hello! Thanks for reaching out with your questions. Let's address them one by one:

  1. 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.

  2. 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.

  3. 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.

useruser2023 avatar useruser2023 commented on May 27, 2024

@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].

  1. 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]))
  1. Prediction p in ComputeLoss , is p from classification head or detection head?
  2. Inside ComputeLoss model is accessing different attributes hyp, nc, nl , na . Except nc I cannot access any other attributes model.model.na AttributeError: 'DetectionModel' object has no attribute 'na'. Why is that?

from yolov3.

github-actions avatar github-actions commented on May 27, 2024

👋 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 ⭐

from yolov3.

glenn-jocher avatar glenn-jocher commented on May 27, 2024

@useruser2023 Great questions! Let's dive right in:

  1. 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]) and torch.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.
  2. Prediction p in ComputeLoss: The p in ComputeLoss 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.

  3. Accessing Attributes like hyp, nc, nl, na: In YOLOv3, nc (number of classes), nl (number of layers), and na (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 like hyp are defined in the model configuration or training script rather than the model object itself. This is why attempting to access model.model.na might result in an AttributeError: 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.