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

Incorrect type hint #12798

Open
2 tasks done
sav0l opened this issue May 18, 2024 · 2 comments
Open
2 tasks done

Incorrect type hint #12798

sav0l opened this issue May 18, 2024 · 2 comments
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@sav0l
Copy link

sav0l commented May 18, 2024

Search before asking

  • I have searched the YOLOv8 issues and found no similar bug report.

YOLOv8 Component

No response

Bug

the PIL.Image.Image type hint is not defined in the predict method of the model class model

Environment

not required

Minimal Reproducible Example

not required

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@sav0l sav0l added the bug Something isn't working label May 18, 2024
Copy link

👋 Hello @sav0l, thank you for your interest in Ultralytics YOLOv8 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.

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.

Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.

Install

Pip install the ultralytics package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.

pip install ultralytics

Environments

YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

Ultralytics CI

If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

@glenn-jocher
Copy link
Member

Hello! Thanks for pointing out the missing type hint for PIL.Image.Image in the predict method. It's great to hear that you're willing to help by submitting a PR! 🚀

Here's a quick example of how you might update the method signature to include the type hint:

from PIL import Image

def predict(self, img: Image.Image):
    # method implementation
    pass

Feel free to make the necessary changes and submit a PR. If you need any guidance on how to proceed with the PR, please let us know. We appreciate your contribution to improving YOLOv8!

@Burhan-Q Burhan-Q added the invalid This doesn't seem right label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants