YOLOv8 | Object Detection on a Custom Dataset using YOLOv8

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

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

  • @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 หลายเดือนก่อน

    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.

  • @sushantparajuli611
    @sushantparajuli611 ปีที่แล้ว +3

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

  • @sangeethag8228
    @sangeethag8228 2 หลายเดือนก่อน

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

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

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

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

    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

  • @DhavalShukla-mc4os
    @DhavalShukla-mc4os 10 หลายเดือนก่อน +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?

  • @neeraj.kumar.1
    @neeraj.kumar.1 ปีที่แล้ว +1

    Thanks Aarohi
    It was as simple as your previous videos.

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

    Amazing video, everything is clear.

  • @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.

  • @adityanjsg99
    @adityanjsg99 2 หลายเดือนก่อน +1

    All her opencv tutorials are thorough

    • @CodeWithAarohi
      @CodeWithAarohi  2 หลายเดือนก่อน

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

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

    You plainly explained it.Thankyou so much👍👍

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

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

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

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

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

      Glad you enjoyed it!

  • @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.

  • @soravsingla6574
    @soravsingla6574 ปีที่แล้ว +1

    Code with Aarohi is Best TH-cam channel for Artificial Intelligence #CodeWithAarohi

  • @createfun1106
    @createfun1106 11 หลายเดือนก่อน

    Very nice tutorial. Thanks 😊

    • @CodeWithAarohi
      @CodeWithAarohi  11 หลายเดือนก่อน

      You're welcome 😊

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

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

  • @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.

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

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

  • @oxynofiring
    @oxynofiring 9 หลายเดือนก่อน +3

    how can i reuse this trained model by saving it

    • @AnmolKumar-so8lh
      @AnmolKumar-so8lh 4 หลายเดือนก่อน

      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 11 หลายเดือนก่อน

    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

  • @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?

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

    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)?

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

    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)

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

    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.

  • @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 ??

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

    @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.

  • @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  ปีที่แล้ว +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 ปีที่แล้ว

      @@CodeWithAarohi Thank you ma'am!!

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

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

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว +1

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

  • @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

  • @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?

  • @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)

  • @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.

  • @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)

  • @hiteshsingh1039
    @hiteshsingh1039 11 หลายเดือนก่อน

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

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

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

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

      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.

  • @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

  • @rakeshbullet7363
    @rakeshbullet7363 11 หลายเดือนก่อน

    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.

  • @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

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

    As usual, great job!

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

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

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

    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

  • @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.

  • @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.

  • @MRDAM-zn4qf
    @MRDAM-zn4qf ปีที่แล้ว

    Hello ma'am, i would like to know if we can add the logic into it?? And if yes then how? I'm currently working on a project where i want to detect traffic violations such as without_helmet, and then if a rider falls into that category i want to capture the image of the number plate corresponding to the rider and then apply OCR. Please help us!

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

      Yes, You can implement this. You need 2 models. First model will detect traffic_violations and then if traffic_violation detected then use another model which is trained to detect license plates. And if license plate is detected then use easy-ocr to fetch the details of that license plate. I will try to do a video on this.

    • @MRDAM-zn4qf
      @MRDAM-zn4qf ปีที่แล้ว

      @@CodeWithAarohi thank you ma'am, there's another violation which is crosswalk violation, if a vehicle is standing on a crosswalk it should detect it as a violation, can i implement something like that with MASK R-CNN or Yolov8??

  • @AJ-wf3wp
    @AJ-wf3wp ปีที่แล้ว

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

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว +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 ปีที่แล้ว

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

  • @Negin-mk1id
    @Negin-mk1id 6 หลายเดือนก่อน

    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  6 หลายเดือนก่อน

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

  • @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

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

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

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

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

  • @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?

  • @allea-zb7kl
    @allea-zb7kl 7 หลายเดือนก่อน

    hi, I have a question. if I divide the dataset into training and testing only, is it necessary to run the validation part? and if not, during inference how to find out the mAP?

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

      Skipping validation means you won't be monitoring the model's performance during training.
      You should only skip this part if you're confident in your training procedure and the dataset quality.
      Regarding inference and calculating mAP without a validation set-
      1-Run inference on your test dataset and get the predicted bounding boxes.
      2- Calculate Intersection over Union (IoU) between predicted bounding boxes and ground truth bounding boxes.
      3- Use the IoU values to compute Precision-Recall curves for each class.
      4- Compute Average Precision (AP) for each class.
      5- Calculate mAP by taking the mean of AP across all classes.
      Here is a code for validation. you can try with this code: github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/val.py

    • @allea-zb7kl
      @allea-zb7kl 7 หลายเดือนก่อน

      @@CodeWithAarohi If I split the data into train, val, and test sets, should I use the mAP from the validation set as the benchmark, or do I also need to calculate the mAP from the test set? By the way, I am conducting research on object detection and I am still confused about which mAP should be used as the benchmark: the mAP from the validation set or the mAP from the test set? Please help me.

  • @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.

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

    Great explanation ! thank youu

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

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

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

    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

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

    Mine is having errors saying it cannot import utils.

  • @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

  • @Sandykrang
    @Sandykrang ปีที่แล้ว +1

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

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

    how can we use multupke file yaml to train yolo??

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

    amazing and up to data as always !

  • @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

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

    can i know where to get the yolov8_pretrained script that you used in the video?

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

      I am sorry, I am not sure which folder yo are talking about. Can you share the time stamp where I discussed it.

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

    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.🙏

  • @SanaN-w2r
    @SanaN-w2r 11 หลายเดือนก่อน

    hi can u tell im using Yolov8 model for Obj Detection on colab, dataset from public Roboflow, detecting defects. Pl tell datasets spilt, train valid or train valid and test too. min epochs for good mAP> pl reply. How to change, hyperpara

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

    i keep getting this error when i try to import ultralytics into the python notebook, although the CLI commands are working and i am able to see the predictions: AttributeError: 'OutStream' object has no attribute 'reconfigure'.
    Any solutions?

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

      I am not sure about the error but you can try to upgrade the jupyter notebook or reinstall it.

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

    ma'am how can we optimize the hyper parameters of Yolov8 ?

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

      docs.ultralytics.com/modes/train/#arguments

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

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

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

    is it possible to convert yolov8 to .pb file tensorflow TF2.?

  • @ishakag262
    @ishakag262 11 หลายเดือนก่อน

    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???

  • @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.

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

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

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

      You can perform data augmentation.

  • @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)

  • @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.

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

    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  3 หลายเดือนก่อน

      Check if the format of images are correct.

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

    I trained the yolov8 model but is there any way that I can download the trained model???

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว +1

      After training your model stored in runs folder. And if you want to use pretrained models then you can get it from yolov8 github repo

  • @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

  • @LolLoloilol
    @LolLoloilol 11 หลายเดือนก่อน

    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.

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

    Results saved to runs\detect\train2
    I cannot find the runs folder . What Can I do ?

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

      @@dhondyash1017 you will see the results folder in the directory from where you are running the code.

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

      @@CodeWithAarohi Thank you !

  • @AmmarAbbasi-l2n
    @AmmarAbbasi-l2n ปีที่แล้ว

    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  ปีที่แล้ว

      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.

  • @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?

  • @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%.

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

    i am trying this in google colab I just want to use this YOLOv8 model and show result
    but runs folder is not getting formed and i cant find a way to store results and display it
    if i set " save_conf=True " then runs folders gets form and in predection folder croped images are getting stored
    please help

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

      so CLI use kar ke pata nahe kaise save karna h
      par py me model.predict() save=True pass karne ke bad save ho ra

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

    maam, how to get dataset into jupyter notebook? i keep getting error

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

      You need to provide the proper path to open a dataset using jupyter notebook. And PLease share the error then only I can suggest the solution.

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

      @@CodeWithAarohi maam i get error "FileNotFoundError". i running the jupyter network in the dataset path.

  • @YamunaAnkamreddy
    @YamunaAnkamreddy 2 หลายเดือนก่อน

    Mam,Can you please tell me how to get those dataset pictures?

    • @CodeWithAarohi
      @CodeWithAarohi  2 หลายเดือนก่อน

      You can download it from roboflow universe. There are variety of datasets there: For example this one: universe.roboflow.com/custom-data/fixed-data

  • @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

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

    Dear Aarohi. How could I activate nvidia cuda for yolov8?

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว +1

      # Train the model with 2 GPUs
      results = model.train(data='coco128.yaml', epochs=100, imgsz=640, device=[0, 1]) . If you are using single gpu the write device=0

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

    how did you connect your local dataset to jupyter?

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

      Just paste the dataset and jupyter notebook in same folder and then provide the path of your dataset in dataset.yaml file

  • @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

  • @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

  • @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 th-cam.com/video/myle_dNJjqg/w-d-xo.html

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

      @@CodeWithAarohi thanks

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

    Hello Good Morning, I just wanted to ask how can I compile the Yolov8 to use it offline. Is it possible to compile it on Tensorflow?

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

      To compile YOLOv8 for offline use doesn't involve a traditional compilation process as you might see with some programming languages. Instead, you need to ensure you have all the necessary dependencies installed and the pre-trained weights downloaded. YOLOv8 will then run inference on your local machine. I never tried with tensorflow as the official repo using pytorch.

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

    hand written text from images using cnn or transfer learning ?, please upload

  • @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

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

    how can i resume model training if there are any interrupt during train the model?

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

      Hi, We can use Resume=True but I think its under development right now. Check this docs.ultralytics.com/python/

    • @iftekharalammithu5128
      @iftekharalammithu5128 ปีที่แล้ว +1

      @@CodeWithAarohi thank you mem

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

    what annotation tools that u used for?

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

      I took this dataset from roboflow universe. But if you want to annotate then you can use tools like Labelimg. You can also use roboflow to annotate your dataset.

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

    Thanks for this video

  • @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%