DETECTRON2 - Training on Custom Dataset 🔥🔥

  Рет қаралды 26,928

The Artificial Guy

The Artificial Guy

Күн бұрын

#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
@JAYGALA-b1k
@JAYGALA-b1k Жыл бұрын
Great video!!! You might've saved me from an entire day of head scratching. Thanks!!! 🤟
@soul931
@soul931 Жыл бұрын
Cool
@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!
@theartificialguy6898
@theartificialguy6898 2 жыл бұрын
Glad it helped! Don't forget to leave a like and subscribe!
@kou9999ful
@kou9999ful Жыл бұрын
Great Video. Can you explain the part of labelling for panoptic segmentation as well? How should we add instance ids to the json file?
@adibahaque3482
@adibahaque3482 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?
@makethisfacefamous3650
@makethisfacefamous3650 Ай бұрын
Hi bro can you do a video for panoptic segmentation with custom data training please
@abbasabdulsalambamidele8760
@abbasabdulsalambamidele8760 2 жыл бұрын
Thank you for the video. Could you help me with how to use a different backbone? like googlenet instead of resnet. Thanks in advance
@SchoolofAI
@SchoolofAI 3 жыл бұрын
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?
@inquisitiverakib5844
@inquisitiverakib5844 Жыл бұрын
Very helpful video... How can we perform evaluatio of the trained model ? Plz help
@yhnshkn
@yhnshkn Жыл бұрын
thanks for the tutorial! can you also please create a video on how to load trained models?
@muhammadatique4293
@muhammadatique4293 3 жыл бұрын
Great effort. I suppose you make modification ti available tutorial of detectron2 on collab notebook
@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
@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?
@chitranjankumarrai1799
@chitranjankumarrai1799 2 жыл бұрын
COOL
@kartikkuri336
@kartikkuri336 Жыл бұрын
Why it's showing as segmentation when we're need detection
@humayunkabir548
@humayunkabir548 2 жыл бұрын
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
@jakobbrsomo5078
@jakobbrsomo5078 3 жыл бұрын
great tutorial. thanks
@mdiftekherhossain6152
@mdiftekherhossain6152 Жыл бұрын
Nice One!
@mohammadrajabi3152
@mohammadrajabi3152 2 жыл бұрын
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 !!!!
@nagendravishwakarma9278
@nagendravishwakarma9278 2 жыл бұрын
did you solve this error bcd i also got the same key error ?
@andianzanulzikra5729
@andianzanulzikra5729 Жыл бұрын
can you help me to add a line of code to calculate the evaluation of the mAP training model?
@samiulhaque3338
@samiulhaque3338 3 жыл бұрын
pytorch 1.9 is indeed compatible.
@nguyentranminhtan.1999
@nguyentranminhtan.1999 2 жыл бұрын
amazing god job
@abiRahimSheikh
@abiRahimSheikh 2 жыл бұрын
cool!
@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 :)
@alfarezamahendra5391
@alfarezamahendra5391 2 жыл бұрын
i get eror said OSError: [Errno 107] Transport endpoint is not connected: './output' how can i solve it ?
@bhuvanbhuvi8959
@bhuvanbhuvi8959 2 жыл бұрын
Instead of showing the predictions in an image how can i get names of predictions?
@theye050505
@theye050505 2 жыл бұрын
Thank you for the video. Where is the colab link?
@siddharthrana512
@siddharthrana512 2 жыл бұрын
This code is not going to work when we send a fresh image for prediction with annotations
@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!!!!!!!
@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!
@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
@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? 😕
@Игорь-ж9р5ж
@Игорь-ж9р5ж 2 жыл бұрын
I get the error as: AttributeError: _func in detectron2/engine/hooks.py how can i solve it?
@JoelPrabhod
@JoelPrabhod 2 жыл бұрын
can you also add a few lines of code to evaluate the model?
@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?
@abheeshtamn6027
@abheeshtamn6027 3 ай бұрын
My exact question!
@limhz2630
@limhz2630 2 жыл бұрын
where can i get the same code shown in colab
@syalwadea
@syalwadea 2 жыл бұрын
how to predict a new images without labeling? :(((
@syalwadea
@syalwadea 2 жыл бұрын
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! ```
@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? :(
@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!
@namandwivedi5652
@namandwivedi5652 Жыл бұрын
Did you get the answer
@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...
@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
@prashantsharmastunning
@prashantsharmastunning 2 жыл бұрын
@@shradhasharma4260 lower the confidence score
@zehra2334
@zehra2334 2 жыл бұрын
thanks for the video! But also, your microphone is not in a good situation, I think.
@bhawanishankarsahu7577
@bhawanishankarsahu7577 2 жыл бұрын
bro i need a file to run this model directily on single image can you help me
@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 жыл бұрын
put a / at the end of your path
@SanjayHovale-bv4tg
@SanjayHovale-bv4tg Жыл бұрын
@@mohammadrajabi3152 this works👍
@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?
@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 :/
@hardikhooda273
@hardikhooda273 2 жыл бұрын
Can anyone tell how to change the size of images
@JOHN-vb5bh
@JOHN-vb5bh 3 жыл бұрын
how to deploy it in mobile phone or coverting it to tensorflowlite
@theartificialguy6898
@theartificialguy6898 3 жыл бұрын
Will make a tutorial soon!
@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]
@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 👍
@karanshirke6538
@karanshirke6538 Жыл бұрын
Cool
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 3,9 МЛН
An Unknown Ending💪
00:49
ISSEI / いっせい
Рет қаралды 58 МЛН
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 27 МЛН
Instance Segmentation Using Mask R-CNN on Custom Dataset
30:35
Code With Aarohi
Рет қаралды 27 М.
Image segmentation with Yolov8 custom dataset | Computer vision tutorial
46:25
Computer vision engineer
Рет қаралды 79 М.
Train Mask R-CNN for Image Segmentation (online free gpu)
34:22
Train custom object detector with Detectron2 | Computer vision tutorial
32:26
Computer vision engineer
Рет қаралды 12 М.
Detectron2 - Next Gen Object Detection Library - Yuxin Wu
10:08
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 3,9 МЛН