B峄 膽峄 qua ph岷 n峄檌 dung

膼贸ng g贸p cho Ultralytics M茫 ngu峄搉 m峄 YOLO Kho

Thank you for your interest in contributing to Ultralytics open-source YOLO repositories! Your contributions will enhance the project and benefit the entire community. This document provides guidelines and best practices to help you get started.

M峄 l峄

  1. Quy t岷痗 峄﹏g x峄
  2. 膼贸ng g贸p th么ng qua Pull Request
  3. B谩o c谩o l峄梚
  4. Gi岷 ph茅p
  5. K岷縯 th煤c

Quy t岷痗 峄﹏g x峄

All contributors must adhere to the Code of Conduct to ensure a welcoming and inclusive environment for everyone.

膼贸ng g贸p th么ng qua Pull Request

We welcome contributions in the form of pull requests. To streamline the review process, please follow these guidelines:

  1. Fork the repository: Fork the Ultralytics YOLO repository to your GitHub account.

  2. T岷 nh谩nh: T岷 m峄檛 nh谩nh m峄沬 trong kho l瓢u tr峄 ph芒n nh谩nh c峄 b岷 v峄沬 t锚n m么 t岷 cho c谩c thay 膽峄昳 c峄 b岷.

  3. Make your changes: Ensure that your changes follow the project's coding style and do not introduce new errors or warnings.

  4. Test your changes: Test your changes locally to ensure they work as expected and do not introduce new issues.

  5. Commit your changes: Commit your changes with a descriptive commit message. Include any relevant issue numbers in your commit message.

  6. Create a pull request: Create a pull request from your forked repository to the main Ultralytics YOLO repository. Provide a clear explanation of your changes and how they improve the project.

K媒 k岷縯 CLA

Before we can accept your pull request, you must sign a Contributor License Agreement (CLA). This legal document ensures that your contributions are properly licensed and that the project can continue to be distributed under the AGPL-3.0 license.

膼峄 k媒 CLA, h茫y l脿m theo h瓢峄沶g d岷玭 膽瓢峄 cung c岷 b峄焛 bot CLA sau khi b岷 g峄璱 PR v脿 th锚m nh岷璶 x茅t trong PR c峄 b岷 r岷眓g:

I have read the CLA Document and I sign the CLA

Chu峄梚 t脿i li峄噓 ki峄僽 Google

When adding new functions or classes, include a Google-style docstring to provide clear and concise documentation for other developers. This helps ensure your contributions are easy to understand and maintain.

V铆 d峄 v峄 Docstrings

V铆 d峄 n脿y cho th岷 chu峄梚 t脿i li峄噓 ki峄僽 Google. L瓢u 媒 r岷眓g c岷 膽岷 v脿o v脿 膽岷 ra types must always be enclosed by parentheses, i.e., (bool).

def example_function(arg1, arg2=4):
    """
    Example function that demonstrates Google-style docstrings.

    Args:
        arg1 (int): The first argument.
        arg2 (int): The second argument. Default value is 4.

    Returns:
        (bool): True if successful, False otherwise.

    Examples:
        >>> result = example_function(1, 2)  # returns False
    """
    if arg1 == arg2:
        return True
    return False

This example shows both a Google-style docstring and argument and return type hints, though both are not required; one can be used without the other.

def example_function(arg1: int, arg2: int = 4) -> bool:
    """
    Example function that demonstrates Google-style docstrings.

    Args:
        arg1: The first argument.
        arg2: The second argument. Default value is 4.

    Returns:
        True if successful, False otherwise.

    Examples:
        >>> result = example_function(1, 2)  # returns False
    """
    if arg1 == arg2:
        return True
    return False

Smaller or simpler functions can utilize a single-line docstring. Note the docstring must use 3 double-quotes and be a complete sentence starting with a capital letter and ending with a period.

def example_small_function(arg1: int, arg2: int = 4) -> bool:
    """Example function that demonstrates a single-line docstring."""
    return arg1 == arg2

Ki峄僲 tra CI h脿nh 膽峄檔g GitHub

Before your pull request can be merged, all GitHub Actions Continuous Integration (CI) tests must pass. These tests include linting, unit tests, and other checks to ensure your changes meet the project's quality standards. Review the output of the GitHub Actions and fix any issues.

B谩o c谩o l峄梚

We appreciate bug reports as they play a crucial role in maintaining the project's quality. When reporting bugs, it is important to provide a Minimum Reproducible Example: a clear, concise code example that replicates the issue. This helps in quick identification and resolution of the bug.

Gi岷 ph茅p

Ultralytics 脭m l岷 Gi岷 ph茅p C么ng c峄檔g GNU Affero v3.0 (AGPL-3.0) cho c谩c kho l瓢u tr峄 c峄 m矛nh, th煤c 膽岷﹜ t铆nh m峄, minh b岷h v脿 t膬ng c瓢峄漬g h峄 t谩c trong ph谩t tri峄僴 ph岷 m峄乵. Gi岷 ph茅p copyleft m岷h m岷 n脿y 膽岷 b岷 r岷眓g t岷 c岷 ng瓢峄漣 d霉ng v脿 nh脿 ph谩t tri峄僴 gi峄 quy峄乶 t峄 do s峄 d峄g, s峄璦 膽峄昳 v脿 chia s岷 ph岷 m峄乵. N贸 th煤c 膽岷﹜ s峄 h峄 t谩c c峄 c峄檔g 膽峄搉g, 膽岷 b岷 r岷眓g m峄峣 c岷 ti岷縩 v岷玭 c贸 th峄 truy c岷璸 膽瓢峄 cho t岷 c岷 m峄峣 ng瓢峄漣.

Ng瓢峄漣 d霉ng v脿 nh脿 ph谩t tri峄僴 膽瓢峄 khuy岷縩 kh铆ch t峄 l脿m quen v峄沬 c谩c 膽i峄乽 kho岷 c峄 AGPL-3.0 膽贸ng g贸p hi峄噓 qu岷 v脿 膽岷 膽峄ヽ cho Ultralytics c峄檔g 膽峄搉g m茫 ngu峄搉 m峄.

K岷縯 th煤c

C岷 啤n b岷 膽茫 quan t芒m 膽贸ng g贸p cho Ultralytics M茫 ngu峄搉 m峄 YOLO D峄 谩n. S峄 tham gia c峄 b岷 l脿 r岷 quan tr峄峮g trong vi峄嘽 膽峄媙h h矛nh t瓢啤ng lai c峄 ph岷 m峄乵 c峄 ch煤ng t么i v脿 th煤c 膽岷﹜ m峄檛 c峄檔g 膽峄搉g 膽峄昳 m峄沬 v脿 h峄 t谩c. Cho d霉 b岷 膽ang c岷 thi峄噉 m茫, b谩o c谩o l峄梚 hay 膽峄 xu岷 c谩c t铆nh n膬ng, 膽贸ng g贸p c峄 b岷 膽峄乽 t岷 ra t谩c 膽峄檔g 膽谩ng k峄.

We look forward to seeing your ideas in action and appreciate your commitment to advancing object detection technology. Let's continue to grow and innovate together in this exciting open-source journey. Happy coding! 馃殌馃専



Created 2023-11-12, Updated 2024-06-08
Authors: UltralyticsAssistant (1), glenn-jocher (7)

脻 ki岷縩