1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] RuntimeError on windows multiprocessing trying YOLOv8 python

Discussão em 'Python' iniciado por Stack, Outubro 1, 2024 às 02:23.

  1. Stack

    Stack Membro Participativo

    I am trying my very first YOLOv8 in Python with Pycharm. The code is quite simple.

    from ultralytics import YOLO

    model = YOLO("yolov8n.yaml")

    results = model.train(data="config.yaml", epochs=2)


    The error I get is as follows.

    RuntimeError: Attempt to start a new process before the current process has finished its bootstrapping phase. This probably means that you are on Windows and you have forgotten to use the proper idiom in the main module: if __name__ == '__main__': freeze_support() ... The "freeze_support()" line can be omitted if the program is not going to be frozen to produce a executable.

    I'm using a MIC-770 V3 with the following versions:

    • Python: 3.11.9
    • CUDA available: True
    • CUDA version: 12.4
    • YOLOv8 version: 8.2.100

    Has anyone had this problem? Is there a drive needed for the GPU or the CPU to handle it multiprocessing ?

    I tried using the multiprocessing library with the following function multiprocessing.freeze_support() but it didn't work.

    Continue reading...

Compartilhe esta Página