[Python] Jupyter Notebook and Python Script return different YOLOV8 instance segmentation masks

Discussão em 'Python' iniciado por Stack, Setembro 25, 2024.

  1. Stack

    Stack Membro Participativo

    I've been running a pretrained YOLOV8 model for instance segmentation. For testing and development I've been using an Anaconda Jupyter Notebook, which I converted into a Python script before deployment.

    Here is the (correct) mask from the Jupyter Notebook:

    [​IMG]

    and here is the result from the Python script:

    [​IMG]

    You can see that the Python result has weird blocks towards the edges of my head and my phone.

    • The code is exactly the same for both versions
    • The Python virtual environment is directly created from the Jupyter environment export (and I double checked: identical Python version and identical versions for all libraries)
    • Same CUDA version
    • Same hardware (both examples were executed on the same machine)

    Does anyone know why this is happening or how I can fix it?

    Continue reading...

Compartilhe esta Página