Fire Detection YOLOv8 with Python (real time & custom data)

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024

ความคิดเห็น • 64

  • @aidajam3294
    @aidajam3294 21 ชั่วโมงที่ผ่านมา

    Are you Portuguese dude ? 😊

  • @alaamohamed5640
    @alaamohamed5640 6 หลายเดือนก่อน +2

    how can get the bath of data

  • @L6FTY
    @L6FTY 8 หลายเดือนก่อน +1

    My image folders were in different spots than roboflow uses now so I changed the data.yaml file to:
    test: ./test/images
    train: ./train/images
    val: ./valid/images

  • @cuongmanh4846
    @cuongmanh4846 7 หลายเดือนก่อน +1

    vscode you create ? time 3:45

  • @jhansip5002
    @jhansip5002 23 วันที่ผ่านมา

    Sir...i want this code and output..

  • @lukbeatz7475
    @lukbeatz7475 8 หลายเดือนก่อน +1

    thanks bro, saved me

  • @kingclash1169
    @kingclash1169 7 หลายเดือนก่อน +1

    How to download the run file to the device?

    • @universityofthefuture2077
      @universityofthefuture2077  7 หลายเดือนก่อน

      You can zip it, then download option should appear when you click three dots

  • @aurgon_42121
    @aurgon_42121 7 หลายเดือนก่อน +1

    I have changed the path according to my folders in google colab , but this line of code " !yolo task=detect mode=train model=yolov8s.pt data=/content/continuous_fire-6/data.yaml epochs=1 imgsz=640 plots=True" is showing the error like this "/bin/bash: line 1: yolo: command not found "
    plz tell me how to deal with it

    • @universityofthefuture2077
      @universityofthefuture2077  7 หลายเดือนก่อน

      Have you install all necessary packages?

    • @aurgon_42121
      @aurgon_42121 7 หลายเดือนก่อน

      Yes but, while importing yolo from ultralytics , it is showing a yellow underline below that
      I think its logical error

    • @universityofthefuture2077
      @universityofthefuture2077  7 หลายเดือนก่อน

      Maybe it’s different version of the package?

    • @tabbabiyosr602
      @tabbabiyosr602 6 หลายเดือนก่อน

      do you write all codes ??

  • @coolghoul9
    @coolghoul9 5 หลายเดือนก่อน

    Does holding a plastic spoon give a false positive

  • @tabbabiyosr602
    @tabbabiyosr602 6 หลายเดือนก่อน

    give me the url of yolov8 in colab please

  • @kingclash1169
    @kingclash1169 7 หลายเดือนก่อน +1

    where is best.pt file i can't find it

    • @universityofthefuture2077
      @universityofthefuture2077  7 หลายเดือนก่อน

      In my case it was in PROJECT/runs/detect/train/weights/best.pt, but if you are using different version of the ultralytics package, the path can be slightly different.

  • @rodrigocorte5289
    @rodrigocorte5289 6 หลายเดือนก่อน

    Thanks for the video, very good explanation!!!

  • @AnimoGameDev
    @AnimoGameDev 7 หลายเดือนก่อน

    Thanks For This Tutorial Hope You Do More💚

  • @MOHAMMEDABDULLAHS21CSR063
    @MOHAMMEDABDULLAHS21CSR063 7 หลายเดือนก่อน

    Thank you sir . done a greate job sir☺

  • @streamology
    @streamology 10 หลายเดือนก่อน

    short and clear video, thanks

  • @cuongmanh4846
    @cuongmanh4846 7 หลายเดือนก่อน

    How come when downloading best.pt the main.py file is available

  • @R1cS0
    @R1cS0 5 หลายเดือนก่อน

    Great video! Thanks for sharing it! Here's a question: could the small Yolo model be used directly on an ESP32Cam to detect a fire and set an alarm (as already covered in the comments below), send a message, etc.?

    • @universityofthefuture2077
      @universityofthefuture2077  5 หลายเดือนก่อน

      Thanks! You can easily export yolo to tflite format (details here: docs.ultralytics.com/integrations/tflite/#deployment-options-in-tflite). I’ve never done this, so I am not sure if ESP can handle it, but probably yes. Hover if your goal is just to make it run, it would be much easier to use rpi zero for example:)

  • @user-sx5ib8vd6l
    @user-sx5ib8vd6l 6 หลายเดือนก่อน

    well done dawg

  • @karimmerchaoui9736
    @karimmerchaoui9736 6 หลายเดือนก่อน

    Why do you do the training in google collab and the prediction in your local environment ?

    • @universityofthefuture2077
      @universityofthefuture2077  6 หลายเดือนก่อน +1

      Prediction is quite fast even without gpu and real-time video streaming on Colab requires some additional set up:)

  • @aurgon_42121
    @aurgon_42121 7 หลายเดือนก่อน

    showing the error of API KEy
    , when i paste the snippet from roboflow,,,

  • @L6FTY
    @L6FTY 8 หลายเดือนก่อน

    How many epochs make sense here?

    • @universityofthefuture2077
      @universityofthefuture2077  8 หลายเดือนก่อน

      Really depends on your goal. You should keep track of loss chart, if the curve stops going down, it's sign that probably further training is not going to make it better.

  • @wanpanman5492
    @wanpanman5492 11 หลายเดือนก่อน +2

    not a very in depth tutorial

  • @MuhamadNoorIman
    @MuhamadNoorIman 3 หลายเดือนก่อน

    great video! can i used the same coding on jupyter notebook?

  • @bangipin361
    @bangipin361 8 หลายเดือนก่อน

    I've followed what's in the video but I always fail

    • @universityofthefuture2077
      @universityofthefuture2077  8 หลายเดือนก่อน

      Hi, which part of the code fails?

    • @L6FTY
      @L6FTY 8 หลายเดือนก่อน

      try updating your paths to the image folders in data.yaml:
      test: ./test/images
      train: ./train/images
      val: ./valid/images

  • @rodrigocorte5289
    @rodrigocorte5289 5 หลายเดือนก่อน

    Hi bro, thanks for responding so quickly!!
    I've tried several times and I can't get an alarm to sound when fire is detected.
    I used this code, but it doesn't work.
    Do you have any suggestions?
    # Function for fire detection and sound alert
    def detect_fire_and_alert():
    # Initialize the YOLO model
    model = YOLO('best.pt')
    # Performs continuous fire detection
    whileTrue:
    # Perform the prediction
    results = model.predict(source=0, imgsz=320, conf=0.6, show=True)
    # Checks for fire detections
    for detection in results.pred:
    if 'fire' in detection['names']:
    # If fire is detected, plays an alert sound
    playsound("alarm_sound.mp3")
    break # Breaks the loop when fire is detected
    # Function call for fire detection and audible alert
    detect_fire_and_alert()
    I would be very grateful if you could help me.
    I need your help!!

    • @universityofthefuture2077
      @universityofthefuture2077  5 หลายเดือนก่อน

      Hi, now its late response, hah, but this snippet it’s quite unreadable, please provide some github repo

    • @rodrigocorte5289
      @rodrigocorte5289 5 หลายเดือนก่อน

      @@universityofthefuture2077 i already solve the problem but thanks 😉

    • @romanshendo4784
      @romanshendo4784 5 หลายเดือนก่อน

      @@universityofthefuture2077 guys can you help me please? a have a this problem to. Thanks

    • @romanshendo4784
      @romanshendo4784 5 หลายเดือนก่อน

      @@rodrigocorte5289 can you help me please? a have a this problem to. Thanks

    • @romanshendo4784
      @romanshendo4784 5 หลายเดือนก่อน

      @@rodrigocorte5289 can you help me please?i hame i same problem

  • @rodrigocorte5289
    @rodrigocorte5289 5 หลายเดือนก่อน

    Hey !! Is there any way to sound an alarm when a fire is detected? Please respond, I really need your help!!

    • @universityofthefuture2077
      @universityofthefuture2077  5 หลายเดือนก่อน +1

      Hi, what do you mean? You can add simple alarm with for example playsound library.

    • @rodrigocorte5289
      @rodrigocorte5289 5 หลายเดือนก่อน

      @@universityofthefuture2077 Hello and thanks for the quick response!!
      It's not that simple, I put an if to play sound when it detects fire but it doesn't work.
      I tried with this code :
      from ultralytics import YOLO
      from playsound import playsound
      # Função para detecção de fogo e alerta sonoro
      def detect_fire_and_alert():
      # Inicializa o modelo YOLO
      model = YOLO('best.pt')
      # Realiza a detecção contínua de fogo
      while True:
      # Realiza a predição
      results = model.predict(source=0, imgsz=320, conf=0.6, show=True)
      # Verifica se há detecções de fogo
      for detection in results.pred:
      if 'fire' in detection['names']:
      # Se o fogo for detectado, reproduz um som de alerta
      playsound("alarm_sound.mp3")
      break # Interrompe o loop quando o fogo é detectado
      # Chamada da função para detecção de fogo e alerta sonoro
      detect_fire_and_alert()
      I can´t do it, could you help me with this

    • @rodrigocorte5289
      @rodrigocorte5289 5 หลายเดือนก่อน

      @@universityofthefuture2077 Hi bro, thanks for responding so quickly
      It's not that simple, I've already tried with this code and I'm not succeeding.
      from ultralytics import YOLO
      from playsound import playsound
      # Function for fire detection and sound alert
      def detect_fire_and_alert():
      # Initialize the YOLO model
      model = YOLO('best.pt')
      # Performs continuous fire detection
      whileTrue:
      # Perform the prediction
      results = model.predict(source=0, imgsz=320, conf=0.6, show=True)
      # Checks for fire detections
      for detection in results.pred:
      if 'fire' in detection['names']:
      # If fire is detected, plays an alert sound
      playsound("alarm_sound.mp3")
      break # Breaks the loop when fire is detected
      # Function call for fire detection and audible alert
      detect_fire_and_alert()
      If you could help I would be very grateful

    • @rodrigocorte5289
      @rodrigocorte5289 5 หลายเดือนก่อน

      @@universityofthefuture2077 Hi bro, thanks for responding so quickly.
      This is not that simple. I've tried several times and still haven't managed to get an alarm to sound when it detects the fire.
      I used this code and I can't do it, do you have any suggestions?
      from ultralytics import YOLO
      from playsound import playsound
      # Function for fire detection and sound alert
      def detect_fire_and_alert():
      # Initialize the YOLO model
      model = YOLO('best.pt')
      # Performs continuous fire detection
      whileTrue:
      # Perform the prediction
      results = model.predict(source=0, imgsz=320, conf=0.6, show=True)
      # Checks for fire detections
      for detection in results.pred:
      if 'fire' in detection['names']:
      # If fire is detected, plays an alert sound
      playsound("alarm_sound.mp3")
      break # Breaks the loop when fire is detected
      # Function call for fire detection and audible alert
      detect_fire_and_alert()
      I would be very grateful if you could help me.
      Bro i really need your help!!

    • @rodrigocorte5289
      @rodrigocorte5289 5 หลายเดือนก่อน

      @@universityofthefuture2077 Hi bro, thanks for responding so quickly!!
      I've tried several times and I can't get an alarm to sound when fire is detected.
      I used this code, but it doesn't work.
      Do you have any suggestions?
      # Function for fire detection and sound alert
      def detect_fire_and_alert():
      # Initialize the YOLO model
      model = YOLO('best.pt')
      # Performs continuous fire detection
      whileTrue:
      # Perform the prediction
      results = model.predict(source=0, imgsz=320, conf=0.6, show=True)
      # Checks for fire detections
      for detection in results.pred:
      if 'fire' in detection['names']:
      # If fire is detected, plays an alert sound
      playsound("alarm_sound.mp3")
      break # Breaks the loop when fire is detected
      # Function call for fire detection and audible alert
      detect_fire_and_alert()
      I would be very grateful if you could help me.
      I need your help!!

  • @aisyahzulaikha01
    @aisyahzulaikha01 9 หลายเดือนก่อน

    How to appear run folder in vs code?

    • @universityofthefuture2077
      @universityofthefuture2077  9 หลายเดือนก่อน

      After you run the script, the folder should be created automatically in the project root directory

    • @aisyahzulaikha01
      @aisyahzulaikha01 9 หลายเดือนก่อน

      @@universityofthefuture2077 alright thank youu, I will try it

    • @houdabekkourialami3581
      @houdabekkourialami3581 8 หลายเดือนก่อน

      I followed the same instructions but the webcam doesn't run for me. The webcam is activated and all. What can be the problem?

    • @MuhamadNoorIman
      @MuhamadNoorIman 3 หลายเดือนก่อน

      @@universityofthefuture2077 where to find the project root directory?

  • @ĐứcHuỳnhTấn-b1s
    @ĐứcHuỳnhTấn-b1s ปีที่แล้ว

    dataset ?

  • @syedyadishalikhan8326
    @syedyadishalikhan8326 ปีที่แล้ว

    source code