YOLOv8 | Object Detection on a Custom Dataset using YOLOv8

Поделиться
HTML-код
  • Опубликовано: 21 ноя 2024

Комментарии • 331

  • @shravanacharya4376
    @shravanacharya4376 Год назад +20

    I have gone through your various tutorials, I can guarantee 100% that everyone will understand this concept. Thank you so much you're doing an amazing job.

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Glad to hear that!

    • @FREEFIREGAMER-iv8dx
      @FREEFIREGAMER-iv8dx Год назад

      maam ,please give me code how to extract detected objects in an image and save those images in seperate files ,like if we detect 5 objects in an image using yolov8,and that image is saved in a file ,then i need the detected objects seperated please help maam@@CodeWithAarohi

  • @AZone.online
    @AZone.online 11 часов назад

    I was so confused in the training of YOLO Models but after watching this tutorial I'm so cleared like my Name.
    Thank You so much.

  • @adityanjsg99
    @adityanjsg99 Месяц назад +1

    All her opencv tutorials are thorough

    • @CodeWithAarohi
      @CodeWithAarohi  Месяц назад

      Thanks so much! I'm glad you find them helpful!

  • @sushantparajuli611
    @sushantparajuli611 Год назад +3

    Wow!! you are brilliant ma'am. Up to date every time. Thank you so much for the invaluable pieces of information.

  • @hamidraza1584
    @hamidraza1584 9 месяцев назад

    Your videos are very informative, in understanding the deep learning models and neurul network s.lots of love from Lahore Pakistan

  • @PRIYAINTOUCH
    @PRIYAINTOUCH Год назад +3

    Excellent, Elite and Eloquent content and crystal-clear explanations. If possible, provide object detection with voice or sound output ie. object name.

  • @thigobd
    @thigobd 5 дней назад

    Today i first wath your video, as you describe everything i relaly like it & i learn new something from the video.

  • @Rishu_Dakshin
    @Rishu_Dakshin Год назад

    Im new to Yolo and with the help of your video i was able to run the code. Thank you for your efforts

  • @soravsingla6574
    @soravsingla6574 Год назад +1

    Code with Aarohi is Best RUclips channel for Artificial Intelligence #CodeWithAarohi

  • @neeraj.kumar.1
    @neeraj.kumar.1 Год назад +1

    Thanks Aarohi
    It was as simple as your previous videos.

  • @dcdales
    @dcdales Год назад

    Gonna lay out a problem I encountered and its solution. Great tutorial by the way, thanks so much!
    Problem: "illegal hardware instruction"
    Solution: Update MacOS. (Nope - that's just a temporary fix - ACTUAL solution: type 'deactivate' to leave the environment, then open the environment again with 'source myenv/bin/activate'. Works for me now.

  • @sangeethag8228
    @sangeethag8228 Месяц назад

    Thanks a lot ,Mam . Very clear from scratch. Great job.

  • @ismailidowu7746
    @ismailidowu7746 Год назад

    Never mind again with my previous question. I got the solution. Thanks

  • @hamidddshekoohiii8267
    @hamidddshekoohiii8267 Год назад

    You plainly explained it.Thankyou so much👍👍

  • @gareven
    @gareven 6 месяцев назад

    Thank you for such a great video! Can you please also make a video to show how to implement focal loss function to YOLOv8?

  • @LolLoloilol
    @LolLoloilol 10 месяцев назад

    Hello Mam,
    the video was very helpful thank you for making such good content.
    can you explain how layer freezing works how we can do it on our pretrained model in yolo it would be quite helpful for us to understand thank you.

  • @aviralkatiyar2538
    @aviralkatiyar2538 Год назад

    Again a really nice video. But from next time could you please share the jupyter notebook as well.That will be a big help.

  • @tonya4092
    @tonya4092 5 месяцев назад

    I really enjoyed your video. I found it to be very concise.

  • @sanathspai3210
    @sanathspai3210 6 месяцев назад

    Hi Arohi. It is very good video and one request could you create playlists for going throughout the papers from yolov1 - v9(present version)? It would be very very beneficial

  • @Developer_Lop_Lop
    @Developer_Lop_Lop Год назад

    thank for your video madam. hope you have a great day

  • @dheerajvasudevaraovelaga6006
    @dheerajvasudevaraovelaga6006 Год назад +1

    I really liked the content and the way you explained it. Is it always required to have a text file for every single image? Doesnt that make it very hard considering people only have images with them? Can you share more knowledge on how you created that custom dataset so that it could be trained on YOLOv8?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +1

      Yes, you always need annotations for each image in txt format. This is the mandatory step to use this algorithm.

  • @shinwarikhan4677
    @shinwarikhan4677 Год назад

    thank you so much mam.. l learn much from your videos thanks alot of... 💗💗💗

  • @aymeneboucha4974
    @aymeneboucha4974 Год назад

    Amazing video, everything is clear.

  • @createfun1106
    @createfun1106 10 месяцев назад

    Very nice tutorial. Thanks 😊

  • @mayurirakhonde7615
    @mayurirakhonde7615 Год назад

    Thanks for the excellent explanation. I am having one doubt. What is mAP50 and mAP50-95? What should we measure for accuracy purpose?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      mAP50 is the mean Average Precision at a 50% IoU (Intersection over Union) threshold. IoU is a measure of the overlap between the predicted bounding box and the ground truth bounding box. A threshold of 50% means that the predicted bounding box is considered a correct detection if it overlaps with the ground truth bounding box by at least 50%.
      mAP50-95 is the mean Average Precision averaged over the range of IoU thresholds from 50% to 95%, with a step size of 5%.

  • @hiteshsingh1039
    @hiteshsingh1039 9 месяцев назад

    Hy aarohi , could you pls also make videos on productionizing models , dufferent ways

  • @JasonsFun17
    @JasonsFun17 Год назад

    It's a great video. I have tried it out and it's working like a charm. Thank you

  • @NA-cw4pj
    @NA-cw4pj Год назад +2

    Hi, incredible explanation and video, I have some questions if you don't mind :
    1.Is this working for a video, for example, and in that case, should I train the model with small part of videos?
    2.If I want to detect a lot of things in a video of a city, should I train the model several times, one for each class (objects)
    Thank you so much!

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +2

      1- Yolov8 is trained on images only. Train your model on images and then you can detect objects from videos also. 2- Create a dataset for all the objects at once. And then train your model on that dataset. No need to train model for separate objects one by one.

  • @Sandykrang
    @Sandykrang Год назад +1

    hi, great video, can we here testing matrices on test data, like classification reports for CNNs

  • @boazmwubahimana4702
    @boazmwubahimana4702 Год назад

    Actually i started watching this video after 23min after uploading, this is very amazing. When are you going to release how to train seg, det and cls model as you mentioned in the endition of this video? We'll buy a coffee one day!

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +1

      Hi, Glad you liked my video. And I will release the Image segmentation on Custom dataset in next 3-4 hours :)

    • @boazmwubahimana4702
      @boazmwubahimana4702 Год назад

      @@CodeWithAarohi can't explain the thankful but over all best of good luck! Resile and Prosper in this year2023. Need to tell others about this work !

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +2

      @@boazmwubahimana4702 ruclips.net/video/myle_dNJjqg/видео.html

    • @boazmwubahimana4702
      @boazmwubahimana4702 Год назад

      @@CodeWithAarohi thanks

  • @thoufeekbaber8597
    @thoufeekbaber8597 Год назад

    nice video

  • @Icodeswift
    @Icodeswift Год назад

    Thank you for this amazing tutorial but can you tell me how to implement this model on Android app.. ?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Convert your model into tflite and then use that for Android App

  • @Marketblank
    @Marketblank 10 месяцев назад

    Hi Thank you for the valuable information and my question which tools you used for labeling? Thank you

    • @CodeWithAarohi
      @CodeWithAarohi  10 месяцев назад +1

      Sometime I use labelImg tool and sometime I work with roboflow.

  • @dna-cs
    @dna-cs Год назад

    Thank you so much ma'am. Your instruction is very clear and easy to understand.
    But I don't know how to intepret the results: confusion matrix, the charts (box loss etc.).
    Is there any standard documentation to follow?
    Thank you

    • @CodeWithAarohi
      @CodeWithAarohi  11 месяцев назад +1

      Confusion Matrix:
      True Positive (TP): Correctly predicted positive instances.
      True Negative (TN): Correctly predicted negative instances.
      False Positive (FP): Incorrectly predicted positive instances.
      False Negative (FN): Incorrectly predicted negative instances.
      Accuracy: (TP + TN) / (TP + TN + FP + FN)
      Precision: TP / (TP + FP)
      Recall (Sensitivity): TP / (TP + FN)
      F1 Score: 2 * (Precision * Recall) / (Precision + Recall)
      Use these metrics to gauge the model's performance, considering the balance between precision and recall.
      Loss Charts (e.g., Box Loss):
      Training Loss: Measures how well the model is learning during training. A decrease indicates learning.
      Validation/Test Loss: Indicates how well the model generalizes to new data. Monitor for overfitting (training loss significantly lower than validation loss).
      Understanding these metrics helps you assess the model's accuracy, ability to identify positives/negatives, and potential overfitting.

    • @dna-cs
      @dna-cs 11 месяцев назад

      @@CodeWithAarohi Thank you ma'am!!

  • @DhavalShukla-mc4os
    @DhavalShukla-mc4os 9 месяцев назад +2

    I am trying to do a traffic light detection project on google colab and during training I am encountering path related errors. What I had in my .yaml file is configuration of train, val, test folders each containing images, labels folders with paths as /content/drive/MyDrive/dataset/train/images and such is the same for /content/..../train/labels. Now what should there exactly be for it to run without errors? Would you have an idea? What paths I should add in every case? Any suggestions from anyone?

  • @abdelhamidazanzal4403
    @abdelhamidazanzal4403 Год назад

    Thanks for the tutorial... when you are programming to make a video on custom image segmentation ?

  • @nuhmanpk3082
    @nuhmanpk3082 Год назад

    Great Video.
    What the format that I need to follow for dataset preparation. Same as yolov5,7 images->train,val , lables->train,val

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Yes, exactly

    • @nuhmanpk3082
      @nuhmanpk3082 Год назад

      @@CodeWithAarohi Can You make a video on how to use a onnx format file or a core ml file in mobile devices for live detection on V8 version

  • @Sunil-ez1hx
    @Sunil-ez1hx 8 месяцев назад

    Nice

  • @oykuecekoken3350
    @oykuecekoken3350 Год назад

    Thank you for the video. I want to show the timer value in the bounding box for each introduced object, how should I do it?

  • @nehavora5146
    @nehavora5146 Год назад

    Nice Tutorial.Thank you So much. Can you suggest how to save the name of the objects detected in the image or video in a txt file using yolov8?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +1

      You can try something like this: import cv2
      import numpy as np
      # Load the YOLOv8 model
      net = cv2.dnn.readNet("path/to/yolov8.weights", "path/to/yolov8.cfg")
      # Load the input image or video
      cap = cv2.VideoCapture("path/to/input.mp4")
      # Loop over each frame
      while True:
      ret, frame = cap.read()
      if not ret:
      break
      # Prepare the frame for inference
      blob = cv2.dnn.blobFromImage(frame, 1/255.0, (416, 416), swapRB=True, crop=False)
      net.setInput(blob)
      outs = net.forward(get_outputs_names(net))
      # Loop over each detection
      for out in outs:
      for detection in out:
      scores = detection[5:]
      class_id = np.argmax(scores)
      confidence = scores[class_id]
      if confidence > 0.5:
      # Extract the bounding box for the detection
      x, y, w, h = (detection[0:4] * np.array([width, height, width, height])).astype("int")
      # Open the text file and write the class label and confidence score
      with open("detections.txt", "a") as f:
      f.write("{} {:.2f}
      ".format(class_labels[class_id], confidence))
      # Display the frame with detections
      cv2.imshow("frame", frame)
      if cv2.waitKey(1) & 0xFF == ord("q"):
      break
      cap.release()
      cv2.destroyAllWindows()

  • @sumanpahari4220
    @sumanpahari4220 Год назад

    Very very useful, madam can you share a notebook and custom dataset. It will be helpful

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Dataset is downloaded from roboflow. And these commands are here github.com/ultralytics/ultralytics/blob/main/examples/tutorial.ipynb

  • @sahilkadu9679
    @sahilkadu9679 Год назад

    Great video & great explanation Ma'am!🙌 Does it require GPU to run? Because I tried running it on Jupyter notebook & the kernel was getting restarted frequently🙁

  • @Negin-mk1id
    @Negin-mk1id 5 месяцев назад

    Hi great tutorial, can you provide the dataset that you used for this tutorial? I want to see the format of the text files

    • @CodeWithAarohi
      @CodeWithAarohi  5 месяцев назад

      Check this dataset. This dataset have 2 classes - table and chair. universe.roboflow.com/search?q=furniture%2520detection%2520object%2520detection&p=3

  • @UR3C00L
    @UR3C00L Год назад

    Great video! Do you know how to choose specific model to train (i.e. yolov8s or yolov8m) without passing pretrained weights?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Yes, you cando that. Get the yaml file of that model. It is available in yolov8 github repo. And then change the number of classes. Leave the other things as it is.

  • @oxynofiring
    @oxynofiring 8 месяцев назад +3

    how can i reuse this trained model by saving it

    • @AnmolKumar-so8lh
      @AnmolKumar-so8lh 2 месяца назад

      You will get a weight file after training then you have to write a inference script you can get that from yoloV8 docs probs and go through the inference script

  • @kosttavmalhotra5899
    @kosttavmalhotra5899 10 месяцев назад

    mam is there any video on you channel which shos how to install, which folders to opt for and while dealing with ultralytics env on your channel

  • @ismailidowu7746
    @ismailidowu7746 Год назад +3

    Thank you so much, Aarohi, for your excellent explanation. You have saved me a lot of time. Quick question . I need to get the exact pixel location(say: 300x200) of those objects detected by Yolo. Do you know how to go about it, please? Any code example will be highly appreciated

  • @nayantharabs9850
    @nayantharabs9850 8 месяцев назад

    Could you please do a tutorial on how to use yolo for object detection in cases where the objects you want to detect are not in the pretrained dataset. As in , to use the pretrained model for feature extraction and detect the custom objects.

  • @mwtest-ty4ro
    @mwtest-ty4ro Год назад

    Great video. One Question. Where/how did you get the labels.cache file?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      When you start training, in the first few seconds it generate labels.cache

    • @mwtest-ty4ro
      @mwtest-ty4ro Год назад

      @@CodeWithAarohi Thank you for your response. Unfortunately I am getting the following error.
      [Errno 2] No such file or directory: 'C:\\Users\\USER\\PycharmProjects\\Yolo8\\Training\\pistol\\train\\labels.cache'
      any clue on how i can solve this. Thanks

  • @jassimelaouni8940
    @jassimelaouni8940 Год назад

    Great explanation ! thank youu

  • @hamidullahturkmen1782
    @hamidullahturkmen1782 Год назад

    thank you Aarohi, could you make a video integrating yolov8 into the flask app

  • @hbrt10
    @hbrt10 Год назад +1

    hi, thank you for the documentation.
    I have a problem about predict images. i trained my model and predict image grayscale but i come into view error : ValueError: axes don't match array.
    What should I do? I must predict image grayscale.

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Your model should be trained on grayscale images if you want to make prediction on grayscale image because colored images have 3 channels and grayscale images have channel 1.

  • @ameer-alahmadi
    @ameer-alahmadi Год назад

    Thanks a lot for your great tutorial . But, can you please explain how to convert yolov8 to tflite model and use it with raspberry pi + coral usb accelerator?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +1

      Will cover in upcoming videos

    • @ameer-alahmadi
      @ameer-alahmadi Год назад

      @@CodeWithAarohi I'll be so grateful, and I'll appreciate it.

  • @germancruzram
    @germancruzram 4 месяца назад

    Will there be any case of transfer learning to add a new class (x classes + new class) to a previously trained model YOLOv8 (x classes)?

  • @thenextlevelclub5120
    @thenextlevelclub5120 Год назад

    Mam, can you come up with video data rather than image data and same video. Just change the dataset with video, will be helpful

  • @FREEFIREGAMER-iv8dx
    @FREEFIREGAMER-iv8dx Год назад +1

    maam ,please give me code how to extract detected objects in an image and save those images in seperate files ,like if we detect 5 objects in an image using yolov8,and that image is saved in a file ,then i need the detected objects seperated please help maam

  • @swimmingliu
    @swimmingliu Год назад

    Thank you for your tutorial.The v8 is easier to install environment required and train custom data’s than v7😂😂😂😂

  • @karthikvb1293
    @karthikvb1293 Год назад

    Great content, can you do a video on yolox

  • @angelospapadopoulos7679
    @angelospapadopoulos7679 Год назад

    amazing and up to data as always !

  • @aasheesh6001
    @aasheesh6001 11 месяцев назад

    Thanks for this video

  • @siddharthabhat2825
    @siddharthabhat2825 Год назад +1

    How to get other metrics like accuracy, specificity and sensitivity ??
    Will it be stored anywhere or if not how to get tp, fp, values, so that any metrics can be calculated ??

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      To calculate metrics such as accuracy, specificity, and sensitivity, you'll need a confusion matrix which we already have.
      Accuracy = (True Positives + True Negatives) / Total Predictions
      Sensitivity = True Positives / (True Positives + False Negatives)
      Specificity = True Negatives / (True Negatives + False Positives)
      Precision = True Positives / (True Positives + False Positives)

    • @siddharthabhat2825
      @siddharthabhat2825 Год назад

      ​@@CodeWithAarohi Thanks a lot for replying !!
      Yea, I can calculate final value manually. But if i want to draw graph/curve, then how can i extract values at every epochs ?? Also, how to plot the ROC curve ??

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      @@siddharthabhat2825 use results.txt file. All the results are saved there. Using this results.txt file. You can plot the graphs for all the epochs.

    • @siddharthabhat2825
      @siddharthabhat2825 Год назад

      @@CodeWithAarohi results.csv gives precision, recall, mAP & other loss values. Is it possible to get tp, fp, tn ,fn values ??

  • @suhailshaji-u9h
    @suhailshaji-u9h Год назад

    Can you please explain why the background is there in confusion matrix even i don't have a class called background.did it trained with other classes

  • @Sandykrang
    @Sandykrang Год назад

    Thank you for amazing tutorial. I am just nor clear with yaml file. Do I have to prepare it manually? Please give me solution this.I will be so thankful to you.

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +1

      Yes, You have to prepare it yourself. Just create a file and name it data.yaml and then paste the below code:
      train: /path/to/train/images
      val: /path/to/val/images
      nc: 2
      names: ['class1', 'class2']

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +1

      You have to change the paths and class names and number as per your dataset

    • @Sandykrang
      @Sandykrang Год назад

      @@CodeWithAarohi Thank you man

  • @rakeshbullet7363
    @rakeshbullet7363 10 месяцев назад

    Can u please share the link for github repo shown in the video . Could not locate that in the description of the video unless i missed it.

  • @jonatapaulino
    @jonatapaulino Год назад

    Hey, thanks for the tips. This files images/1.jpg is where? I downloaded an image and ran the code but I couldn't get the image recognized.

  • @irani9957
    @irani9957 Год назад

    great video , tnx, is it possible to learn detect and counting for yolov6-7-8 ?

  • @AbhijitDas-c5m
    @AbhijitDas-c5m Год назад

    Aarohi ma'am, I have a dataset of chest xrays. I want to predict the active tb and latent tb . but the other 2 classes dont have annotations. how to approach this?

  • @ShivamRana-wv6uo
    @ShivamRana-wv6uo Год назад

    after using task=predict command it is showing "448x640 10 humans, 16.0ms
    " but the output image is not shown. Iam running it on pycharm

  • @Rishu_Dakshin
    @Rishu_Dakshin Год назад

    Hello, Thank you very much for your reply. i also want to know how to capture the accuracy of the model. information like
    ( How many images testing
    How many clear
    How many are not clear
    Model|accuracy|%|images tested) need to be captured. Can you please help me with this

  • @imenselmi9230
    @imenselmi9230 Год назад

    Can you make video about model inference using NVIDIA triton server and yolo how optimise the model using triton

  • @SajinSree-rz5ly
    @SajinSree-rz5ly Год назад +1

    from ultralytics import YOLO
    model=YOLO('yolov8n-seg.pt')
    model.predict(source='img.jpg')
    Mam Code Is Running But Still It not saving the segmented image

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +2

      model.predict(source='img.jpg', save=True)

  • @MyExRebirth
    @MyExRebirth Год назад

    Hi Aarohi! thank you for your detailed tutorials. Could you please make a video about using a YOLOv8 object detection model in an Android app? I'd appreciate it a llllllot!!!

  • @arka6501
    @arka6501 Год назад

    "yolo is not recognized as an internal or external command operable program or batch file"; I am facing this problem when I am going to execute the yolo command. Please give me some advice to solve this problem

  • @mayaltaee2963
    @mayaltaee2963 9 месяцев назад

    @CodeWithAarohi, Hello, I traind the yolov8 (detect) on custom dataset now how can I assess the yolov8 model with test dataset where I can get Recall , Precision, mAP, confusion matrix, curvs, and accurecy.

  • @vishalpahuja2967
    @vishalpahuja2967 Год назад

    Hi Aarohi ,can you make video for detecting objectts from floor plan images using yolov8 as i cannot find any resource for that. It would be really helpful if you make one

  • @velugucharan8096
    @velugucharan8096 4 месяца назад

    Madam please use google cloab and explain object reidentification concept and code next video please

  • @KKD-q7f
    @KKD-q7f Год назад

    Hi, great video!I have a question:in object detect ,I only have one training class,for exemple “dog”, the training effect is not good, and the label boxes are all the same size, how should I improve it

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      need more detail about your dataset to suggest you anything

    • @KKD-q7f
      @KKD-q7f Год назад

      @@CodeWithAarohi Object penct 1.5%

  • @JustShorts-7
    @JustShorts-7 Год назад

    Ma'am , what if the source is webcam or external camera , can it detect object in real time and can we use this model separately to detect from Web cam with bounding box in real time ?
    Please answer this

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Yes, you can use webcam as input to your Object Detection model.

  • @fabiodagostino7529
    @fabiodagostino7529 9 месяцев назад

    can you explain the labels annotation in details? Is it x,y of the top left corner + width and height normalized?

    • @CodeWithAarohi
      @CodeWithAarohi  9 месяцев назад

      x-coordinate of the center: This is the x-coordinate of the center of the bounding box relative to the width of the image.
      y-coordinate of the center: This is the y-coordinate of the center of the bounding box relative to the height of the image.
      Width of the bounding box: This is the width of the bounding box relative to the width of the image.
      Height of the bounding box: This is the height of the bounding box relative to the height of the image.
      These coordinates are often normalized to the range [0, 1], where (0, 0) represents the top-left corner of the image, and (1, 1) represents the bottom-right corner.

  • @zaidbilakhia6312
    @zaidbilakhia6312 11 месяцев назад

    Hello, WIth GPU (with cuda) it doesnt work but with cpu it works.
    NotImplementedError: Could not run 'torchvision::nms' with arguments from the 'CUDA' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build)

  • @jamesroy9027
    @jamesroy9027 Год назад

    Thank You so much 🤗🤗🤗

  • @galaxywalker5372
    @galaxywalker5372 6 месяцев назад

    every one is focusing on what she is teaching, meanwhile me looking at RTX 3090 and thinking why do I not have that :(

  • @salmankmohammed
    @salmankmohammed 2 месяца назад

    I have trained a custome dataset on Yolov8. The training set consists 600 images. Unfortunatelly, when I have trained the yolov8 it only trained on 30 images, so could you please help me to solve this problem..thanks in advance.

    • @CodeWithAarohi
      @CodeWithAarohi  2 месяца назад

      Check if the format of images are correct.

  • @srinidhijala3688
    @srinidhijala3688 Год назад

    Thanks a lot mam

  • @goksel9908
    @goksel9908 Год назад +1

    I'm going to make multi label classification (9 classes). Am i have to create text files for labels ? Or add csv files each train and val folders? I'm confused because I put all images in the folders of the classes they belong to and i thought classification models doesnt have to include csv or text files because of this.
    Thank you from now

  • @karmayogi5531
    @karmayogi5531 3 месяца назад

    Hello ma'am, when I am running the first command line to detect......I am getting this error...(yolov8_myenv) E:\MTP Project\YOLO_P1>!yolo task=detect mode=predict model=y
    olov8n.pt source="images/1.jpg"
    '!yolo' is not recognized as an internal or external command,
    operable program or batch file.
    Can you please help me with this.🙏

  • @ishakag262
    @ishakag262 9 месяцев назад

    I am getting the Box(P = 0 R = 0 mAP50 = 0 mAP50-95 = 0 )zero at the time of training the dataset at the epochs any solution for this issue???

  • @jeffreyeiyike122
    @jeffreyeiyike122 Год назад

    @CodeWithAarohi, please can you help with directions on how to features for yolo v8, a layer before the output layer where I can find images features, bounding features, confidence/probability before it get to the output layer. I need it for the training of another model. Thank you

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      USing this code, you can get boxes, clabels and probability scores.
      from ultralytics import YOLO
      # Load a model
      model = YOLO("yolov8n.pt") # load a pretrained model (recommended for training)
      #results = model("images/person.jpg", save=True)
      results = model("images/1.jpg", save=True)
      class_names = ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush']
      for result in results:
      boxes = result.boxes # Boxes object for bbox outputs
      probs = result.probs # Class probabilities for classification outputs
      cls = boxes.cls.tolist() # Convert tensor to list
      xyxy = boxes.xyxy
      xywh = boxes.xywh # box with xywh format, (N, 4)
      conf = boxes.conf
      print(cls)
      for class_index in cls:
      class_name = class_names[int(class_index)]
      print("Class:", class_name)

  • @victorarayal
    @victorarayal Год назад

    Thanks!
    Is it possible to change the size of the images at training and set a custom one?

  • @connectrRomania
    @connectrRomania Год назад

    Kernel dead when training on custom data, any advice how to minimize the model parameter to avoid cuds problems

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +1

      results = model.train(data="custom_data.yaml", epochs=20, workers=1, batch=8,imgsz=640)

  • @AmmarAbbasi-l2n
    @AmmarAbbasi-l2n 11 месяцев назад

    can we run live inferencing on yolov8 without using the ultralytics library like we used to in previous version of yolov8? I want to setup the codebase instead of directly running using ultralytics library.

    • @CodeWithAarohi
      @CodeWithAarohi  11 месяцев назад

      Yes, you can run YOLOv8 for live inference without relying on the Ultralytics library, but it requires setting up the environment, handling the model loading, inference, and post-processing manually.

  • @cyberhard
    @cyberhard Год назад

    As usual, great job!

  • @ИльяГригорьевичМельников

    i followed all ur steps, but when its at the training part, I face an issue: "No labels found in path\labels.cache", can not start training.
    Deleting and restarting doesn't help...
    (The labels.cache file is only created in the train folder)

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      If you are getting .cache for training labels and not for val labels. That means there is some issue with your validation annotations. Check them

  • @abubakarsaleem5167
    @abubakarsaleem5167 Год назад

    Maam, can you please guide me about how to save weights after every epoch in yolov8?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +1

      import torch
      # Define your YOLOv8 model
      model = YOLOv8()
      # Define your optimizer and loss function
      optimizer = torch.optim.Adam(model.parameters(), lr=0.001)
      criterion = ...
      # Train your model
      for epoch in range(num_epochs):
      # Train for one epoch
      for batch in data_loader:
      # Forward pass
      outputs = model(inputs)
      loss = criterion(outputs, targets)
      # Backward pass and optimization
      optimizer.zero_grad()
      loss.backward()
      optimizer.step()
      # Save the model after each epoch
      torch.save(model.state_dict(), f"weights_epoch{epoch}.pth")

    • @abubakarsaleem5167
      @abubakarsaleem5167 Год назад

      @@CodeWithAarohi Thanks maam for your quick response but maam whenever i run this code i got the following error by running this code and one more thing can you please guide me about in which repository would i execute this code.
      model = YOLOv8()
      NameError: name 'YOLOv8' is not defined

  • @TucBT
    @TucBT Год назад

    Hi, I am in the first step and try to predict model in CLI, I cannot get the "result saved to runs\detect\..." thing. It takes the image, model etc. but does not give the result, why?

  • @srivalliyada6610
    @srivalliyada6610 12 дней назад

    Mam i did this but the dataset is imbalanced is it ok to continue?
    And how can i balance an imbalanced dataset

  • @AJ-wf3wp
    @AJ-wf3wp 11 месяцев назад

    mam how are you having predict and all folders ?
    please tell me how to setup env from starting.

    • @CodeWithAarohi
      @CodeWithAarohi  11 месяцев назад +1

      Run these commands one by one-
      # In below command 3.9 is my python version with which I want to create separate environment
      py -3.9 -m venv myvenv
      myvenv\Scripts\activate
      pip install ultralytics
      pip install jupyter notebook
      # To open jupyter notebook type:
      jupyter notebook

    • @AJ-wf3wp
      @AJ-wf3wp 11 месяцев назад

      @@CodeWithAarohi mam while installing labelImg ....I am facing issue "ERROR: Failed Building wheel for PyQt5-sip"

  • @codewitharya
    @codewitharya Год назад

    Hello Ma'am. In my case just getting summary of predicted image but not getting the predicted image.

  • @nouamanesouadi7187
    @nouamanesouadi7187 Год назад

    how can I detect using a python script, the consol shows me that the image is processed but I can't find where it's saved

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      By default it get stored in "runs" folder. If your image is not there then use save=True in your command

  • @razorphone77
    @razorphone77 Год назад

    Isnt the point that we use pretrained weights with a custom dataset? ie n, s, m, l etc. in v5 you had to specify which you wanted to use. What does model = YOLO() use?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +1

      model = YOLO() creates an instance of the YOLO object detection model.
      And this is how you use it:
      model = YOLO("yolov8n.yaml") # build a new model from scratch
      model = YOLO("yolov8n.pt") # load a pretrained model (recommended for training)

    • @razorphone77
      @razorphone77 Год назад

      @@CodeWithAarohi I cant find a run directory? How does this get created? I can run the code successfully, but I have no run folder.

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      @@razorphone77 Add save=True in your command

    • @razorphone77
      @razorphone77 Год назад +1

      @@CodeWithAarohi I notice you didn't do that when you ran it from the command line (5.52), why did it work for you?