DETECTRON2 - Training on Custom Dataset 🔥🔥

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024
  • #detectron2 #theartificialguy #deeplearning
    Hello all, so it took me a while creating this video and finally I came up with it. So, in this video, we will be training DETECTRON2 on a CUSTOM dataset. I used Skin Disease dataset for this tutorial. The same procedure can be applied on any other kind of dataset.
    Do check out my previous video in which I have implemented 4 Advanced Computer Vision tasks like Object detection, Keypoints detection, Instance segmentation and Panoptic segmentation.
    Link: • DETECTRON2 - 4 Advance...
    Click for surprise or subscribe? : bit.ly/377M8Nb
    My website where I have written many blogs similar to this video.
    Link: bugspeed.xyz
    Code: github.com/yas...
    Dataset: drive.google.c...
    Support and show your love: bit.ly/377M8Nb
    Please do hit LIKE, SHARE the video and SUBSCRIBE to the channel because that's what keep me motivated to create such videos.

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

  • @adibahaque3482
    @adibahaque3482 2 года назад +2

    This is such a great tutorial.
    Can you please make a tutorial using Vision Transformer for training on custom dataset for instance segmentation task?

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

    Great Video. Can you explain the part of labelling for panoptic segmentation as well? How should we add instance ids to the json file?

  • @muhammadatique4293
    @muhammadatique4293 3 года назад

    Great effort. I suppose you make modification ti available tutorial of detectron2 on collab notebook

  • @nguyentranminhtan.1999
    @nguyentranminhtan.1999 2 года назад

    amazing god job

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

    Hi bro can you do a video for panoptic segmentation with custom data training please

  • @mohammadrajabi3152
    @mohammadrajabi3152 2 года назад +1

    Thank you very much for this tutorial. unfortunately i have a error KeyError: 'imagePath' on my trainer. I checked every single code for that but i found anything incorrect. please help meeeee !!!!

  • @dk_x.095
    @dk_x.095 5 месяцев назад

    Dataset link not working

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

    the code is showing "No CUDA GPUs are available" error, please help!

  • @prashantsharmastunning
    @prashantsharmastunning 2 года назад

    hi , i have trained the model on custom dataset, and the total loss is decreasing also, but while prediction its not predicting anything, just printing grayscale images. please help

  • @JAYGALA-b1k
    @JAYGALA-b1k Год назад +1

    Great video!!! You might've saved me from an entire day of head scratching. Thanks!!! 🤟

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

    Can you please let me know how can I input the video in this and get the video with bounding boxes and mask

  • @tugbayildizli3828
    @tugbayildizli3828 2 года назад

    Thanks for the video. FileNotFoundError: [Errno 2] No such file or directory: '/content/drive/MyDrive/datasets/train/..\\images\\potholedataset_(1).jpg' Why cannot it find the image file? It shows up in the trainer.train() step.

    • @theartificialguy6898
      @theartificialguy6898  2 года назад

      Please double check your path, or you can just try to read an image from your directory to make sure you've set the correct path, something like : img = cv2.imread("your_path_here")
      Or if you're using colab you can open file navigation from left panel and right click on any image then select "copy path" and double check it.
      Or you can type "pwd" in a cell to get the current working directory full path and use that instead...
      Hope it works!

  • @abbasabdulsalambamidele8760
    @abbasabdulsalambamidele8760 2 года назад +1

    Thank you for the video. Could you help me with how to use a different backbone? like googlenet instead of resnet. Thanks in advance

  • @syalwadea
    @syalwadea 2 года назад +1

    how to predict a new images without labeling? :(((

    • @syalwadea
      @syalwadea 2 года назад +1

      i mean how to use a model with a new image? :D i need your help

    • @theartificialguy6898
      @theartificialguy6898  2 года назад

      @@syalwadea Hi, you could do something like this:
      ```
      from detectron2.engine import DefaultPredictor
      from detectron2.config import get_cfg
      cfg = get_cfg()
      cfg.MODEL.WEIGHTS = os.path.join("path_to_your_model_file.pth")
      cfg.MODEL.ROI_HEADS.NUM_CLASSES = 2 // your task num classes
      cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5
      predictor = DefaultPredictor(cfg)
      img = cv2.imread("path _to_img")
      outputs = predictor (img)
      And then the same code for visualization, i hope it helped!
      ```

  • @samiulhaque3338
    @samiulhaque3338 3 года назад +2

    pytorch 1.9 is indeed compatible.

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

    while running "trainer = DefaultTrainer(cfg)" i am getting the error that Cuda is not available. How to fix that problem

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

      in colab first set the path runtime as GPU

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

    Why it's showing as segmentation when we're need detection

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

    Cool

  • @alfarezamahendra5391
    @alfarezamahendra5391 2 года назад

    i get eror said
    OSError: [Errno 107] Transport endpoint is not connected: './output' how can i solve it ?

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

    how can we get approx size of the object cm from mask? or is there any way to do it? can it be done while labelling the images if yes then how?

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

    hi!
    Great tutorial! Help me please, how i can convert "pth" format to "onnx"? I want to use this in opencv. Help me please!!!!!!!

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

    i have a validation data set as well. how can I use them or how can I edit the code in order to use the validation data,so that I can see the validation loss and training loss curve,to comment on if its underfitting or overfitting. Please response

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

    Very helpful video...
    How can we perform evaluatio of the trained model ?
    Plz help

  • @Игорь-ж9р5ж
    @Игорь-ж9р5ж 2 года назад

    I get the error as: AttributeError: _func in detectron2/engine/hooks.py
    how can i solve it?

  • @zehra2334
    @zehra2334 2 года назад

    thanks for the video! But also, your microphone is not in a good situation, I think.

  • @siddharthrana512
    @siddharthrana512 2 года назад

    This code is not going to work when we send a fresh image for prediction with annotations

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

    can you help me to add a line of code to calculate the evaluation of the mAP training model?

  • @bhuvanbhuvi8959
    @bhuvanbhuvi8959 2 года назад

    Instead of showing the predictions in an image how can i get names of predictions?

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

    thanks for the tutorial! can you also please create a video on how to load trained models?

  • @VBFilms
    @VBFilms 2 года назад

    So why do the test data also have to have the JSON-file? I thought that I could just upload pictures without any labeling to a trained model and only the training data would require the labeling?

  • @bhawanishankarsahu7577
    @bhawanishankarsahu7577 2 года назад

    bro i need a file to run this model directily on single image can you help me

  • @Samurai-in5nr
    @Samurai-in5nr 2 года назад

    Can these steps be used for detecting key point of animals like dogs? If yes how can i do so can u please give a little bit of advice or Not is there any way to acheive this without using any state-of-art libraries like mmpose and deeplabcut?

    • @zehra2334
      @zehra2334 2 года назад

      why not? But first of all, you should create the coordinates...

  • @theye050505
    @theye050505 2 года назад

    Thank you for the video. Where is the colab link?

  • @abdelkarimlahmdani6793
    @abdelkarimlahmdani6793 2 года назад

    hi,
    i want to use Faster R-CNN for detection plants diseases in this code.
    how to use Faster R-CNN model in this code please help me.

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

      hey if you done the above code then will you plz help me?

  • @owen261
    @owen261 2 года назад

    Amazing tutorial. How do I test it on data that does not have json files? just a 100% new image.

    • @syalwadea
      @syalwadea 2 года назад

      are you find the answer? :(

  • @hardikhooda273
    @hardikhooda273 2 года назад

    Can anyone tell how to change the size of images

  • @limhz2630
    @limhz2630 2 года назад

    where can i get the same code shown in colab

  • @paulkirchner6901
    @paulkirchner6901 2 года назад

    Well the tutorial worked and i used it to classifie street signs but in testing it didn´t recognise something in the picture could someone help me with that?

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

      how you tackle this issue? bec i am also facing the same problem :/

  • @leedida2134
    @leedida2134 2 года назад

    thank you for uploading this video. it helped me a lot, i tried to implement this detectron2 in my project, and i completely seen my custum data work. thank you for sharing. thanks!

  • @rebeccac7735
    @rebeccac7735 2 года назад

    I keep getting an error message, No such file or directory: '/content/drive/MyDrive/datatrain', when I run the trainer. Any help would be appreciated!

    • @theartificialguy6898
      @theartificialguy6898  2 года назад

      Please check the path that you are using and make sure you have the file on that directory you mentioned!

    • @mohammadrajabi3152
      @mohammadrajabi3152 2 года назад +1

      put a / at the end of your path

    • @SanjayHovale-bv4tg
      @SanjayHovale-bv4tg Год назад

      @@mohammadrajabi3152 this works👍

  • @JoelPrabhod
    @JoelPrabhod 2 года назад

    can you also add a few lines of code to evaluate the model?

  • @ManuelHernandez-zq5em
    @ManuelHernandez-zq5em 2 года назад

    Great video! And your code worked well with no issues! Thank you! Question: Once I am done training the model, is there a way to download it (as a file) to use it by inference on a Python program running in my local laptop?

    • @Imdeepmind
      @Imdeepmind 2 года назад

      You can download the model directly from Colab and use it locally.

    • @ManuelHernandez-zq5em
      @ManuelHernandez-zq5em 2 года назад

      @@Imdeepmind Oh yes. Thank you. I have another question. How can I export an ONNX model out of this model? I have been breaking my head looking online and all I find are samples on existing models from model zoo but, nothing on a custom model. Any ideas? 😕

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

    Nice One!

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

    Cool

  • @abiRahimSheikh
    @abiRahimSheikh 2 года назад

    cool!

  • @chitranjankumarrai1799
    @chitranjankumarrai1799 2 года назад

    COOL

  • @JOHN-vb5bh
    @JOHN-vb5bh 3 года назад

    how to deploy it in mobile phone or coverting it to tensorflowlite

  • @jakobbrsomo5078
    @jakobbrsomo5078 3 года назад

    great tutorial.
    thanks

  • @Mr.Esmaily
    @Mr.Esmaily 3 года назад

    Dose detectron2 runs on rtx3090 ?

    • @theartificialguy6898
      @theartificialguy6898  3 года назад

      Absolutely, make sure you have installed CUDA toolkit and Cudnn.
      For more details you can visit nvidia site: www.nvidia.com/object/geforce_family.html
      And if you liked the video, do not forget to subscribe to the channel :D

    • @Mr.Esmaily
      @Mr.Esmaily 3 года назад

      @@theartificialguy6898 thx bro, sure, im subscribed 👍

  • @ajitegar7738
    @ajitegar7738 2 года назад

    thanks sir, this video is amazing 🔥

    • @theartificialguy6898
      @theartificialguy6898  2 года назад

      Glad you found it helpful! Please do leave a like and subscribe to the channel :)

  • @SchoolofAI
    @SchoolofAI 3 года назад +1

    This is a really great tutorial. It's perfectly paced and explained everything without explaining too much that's not needed for the specific task of training a model using custom data. Great work.

    • @theartificialguy6898
      @theartificialguy6898  3 года назад

      Glad to hear! Thanks;
      Please do consider linking the video and subscribing to the channel :D

    • @coder5199
      @coder5199 2 года назад

      ​@@theartificialguy6898 Hi thanks for this video. There are TONS of YT vids on Detectron2 for object detection and instance segmentation but NONE on semantic segmentation for custom datasets. Can you be the one that fill the gap?

  • @deidy2005
    @deidy2005 2 года назад

    Man, I created a customized model with 3 classes (A, B and C). And I would like to take especific masks for a especific object. And I use this code: mask_A = outputs['instances'].pred_masks.cpu().numpy()[0]