YOLO-NAS + SAM : Image Segmentation Using YOLO-NAS and Segment Anything Model

  Рет қаралды 11,136

Code With Aarohi

Code With Aarohi

Күн бұрын

Пікірлер: 54
@DinitoThompson
@DinitoThompson Жыл бұрын
Would be nice if you could link the source code in the description
@helloansuman
@helloansuman Жыл бұрын
How to train this on 8 GPUs on DGX A100?
@CodeWithAarohi
@CodeWithAarohi Жыл бұрын
docs.deci.ai/super-gradients/documentation/source/device.html#4-ddp-distributed-data-parallel
@helloansuman
@helloansuman Жыл бұрын
@@CodeWithAarohi thank you. I tried this but I will try again
@balveersingh3051
@balveersingh3051 Жыл бұрын
wonderful
@CodeWithAarohi
@CodeWithAarohi Жыл бұрын
Thank you!
@nandiniloku7747
@nandiniloku7747 Жыл бұрын
excellent explanation mam.. can you please show me how to save the segmented image (not the mask i want only segmented image to be saved in the other folder
@junioraguilar7880
@junioraguilar7880 Жыл бұрын
could you provide the notebook of this video?
@sebaarr
@sebaarr Жыл бұрын
Thanks, good video! it's possible to run the YOLO-NAS + SAM in a Jetson Nano?
@CodeWithAarohi
@CodeWithAarohi Жыл бұрын
Will try this on Jetson Nano and reply you back 🙂
@ZeynepC3
@ZeynepC3 10 ай бұрын
Thanks for your videos! Do you think YOLO-NAS + SAM is suitable for realtime applications? Have you ever checked FPS? I'm curious about your thoughts.
@CodeWithAarohi
@CodeWithAarohi 10 ай бұрын
I think Yes, YOLO-NAS is a better choice as compare to yolov8 because of the quantization blocks it has.
@전주석-m5f
@전주석-m5f Жыл бұрын
Hello. Thank you for the good video. I'm leaving a message because I have one question. Is it possible to segment objects that have a hole in the middle, like a donut? And if you can, what labeling tool do you use for things like donuts? Most labeling is in polygon format, but I don't know what to do in cases like donuts, so I'm asking.
@CodeWithAarohi
@CodeWithAarohi Жыл бұрын
Yes, you can segment objects with holes like donuts by using image labeling tools that support multiple polygon annotations for a single object, enabling you to outline both the outer shape and the inner hole separately. Tools like Labelbox, VGG Image Annotator (VIA), and Roboflow offer this functionality.
@cocon8287
@cocon8287 Жыл бұрын
what are the benefits of using yolo nas instead of just conditioning sam with a text prompt "person" ? I am newbie in computer vision but not deep learning
@priyanshupandey3148
@priyanshupandey3148 Жыл бұрын
I have different folders for different classes of images with it's mask images in the same folder. I want to perform segmentation with YOLO+SAM. Please suggest other advance possible approaches and codes.
@jasonl2860
@jasonl2860 Жыл бұрын
what if there is some other things inside that person bounding box, will the SAM model segmented those things as well? thanks
@CodeWithAarohi
@CodeWithAarohi Жыл бұрын
We need to train our object detection model for those other things. And when our Object detection model will generate the bounding box for those other things. All the boxes will be the input to SAM and SAM will generate Masks for all of them.
@TY_B_39_SejalParate
@TY_B_39_SejalParate 8 ай бұрын
how can i use this code to perform instance segmentation in real time using a laptop's webcam?
@CodeWithAarohi
@CodeWithAarohi 8 ай бұрын
You need to change the source of input to webcam of our laptop.
@jeffreyeiyike122
@jeffreyeiyike122 Жыл бұрын
I dont know why the detection_pred= model.predict(image_path, conf=conf_threshold)._images_prediction_lst is not print the results. I want to extract the use the image feature vectors, bounding box for another neural network. I have tried the code but not get the rsults
@NnannaEze
@NnannaEze Жыл бұрын
Did you find the solution to this? I also experienced this
@jeffreyeiyike2358
@jeffreyeiyike2358 Жыл бұрын
@@NnannaEze not yet.
@ArbaazShaikh-y3t
@ArbaazShaikh-y3t Жыл бұрын
what if I have multiple person in the image, YOLO-NAS will detect all the persons and will those all person will get SAM segmentation?
@CodeWithAarohi
@CodeWithAarohi Жыл бұрын
Correct
@ArbaazShaikh-y3t
@ArbaazShaikh-y3t Жыл бұрын
@@CodeWithAarohi I have a bounding box data of "face" of person in an image, from that bounding box can I segment the entire person body. If yes can you please explain how ? one thing that thought was to get the centroid of the face bounding box and use that centroid point as the input for SAM model rather than using bounding box. From the centroid point can i get the entire person body segmented ? in the demo of SAM, I can see we can but with the code how ? can you please explain mam. It would be really helpful. Thank you in advance.
@Andre_Villela
@Andre_Villela Жыл бұрын
I don't understand how do you select just the person class to be the "zero class" on coco dataset.
@CodeWithAarohi
@CodeWithAarohi Жыл бұрын
Person class have 0 id in coco dataset. I just ran the Object detection model which gave me the id of Object detected in the image which is Person in this case.
@jyothir07
@jyothir07 Жыл бұрын
Can't we use SAM alone to get the bbox instead of using 2 DL models? by getting the min rectangle for the segmented part alone.
@CodeWithAarohi
@CodeWithAarohi Жыл бұрын
As per my understanding, The Segment Anything Model (SAM) predicts object masks given prompts that indicate the desired object. Prompts can be provided via the predict method to efficiently predict masks from those prompts. The model can take as input both point and box prompts. Also, SAM model predicts object masks only and does not generate labels. Suppose you have a image which have person and bus class. SAM will put masks on both the objects (it will even put the mask on subparts of the objects like separate mask for tyre, windows etc.). We can get a mask for specific object using point or box prompts. Suppose we chose box prompt to display mask. When we pass our image to SAM, it will give us boxes for all the objects. But we only want a box on Person. To put the mask on the box that corresponds to a person, you need to first identify the mask that represents the person. You can do this by checking the label associated with each mask and selecting the mask with the label "person". SAM is not trained on corresponding labels. Here you need a detection algorithm which will give you the box co-ordinates of the object you are interested in.
@jyothir07
@jyothir07 Жыл бұрын
I agree, but using the point prompt we can segment the object as shown in the official notebook. we could use an interface for that and then simply take the minimum area rectangle of the contour of interest using opencv. correct me if wrong.
@tusharvora3921
@tusharvora3921 Жыл бұрын
@@jyothir07 you can definetly do that as long as you are not interested in class labels ]
@meg33333
@meg33333 Жыл бұрын
Maam can you also make a model which convert hindi text or sentence to image. If possible pls give your tips.
@CodeWithAarohi
@CodeWithAarohi Жыл бұрын
I will try
@meg33333
@meg33333 Жыл бұрын
@@CodeWithAarohi Hindi text to sign language images something like that bec now a day AI become more advance so this project may be benefit to others.
@deepakts8941
@deepakts8941 Жыл бұрын
hi mam, which Yolo model is better for small object detection ( like grains ) now I am using Yolo v7 can I switch to V8 or NAS
@abdurrahimbalta1015
@abdurrahimbalta1015 Жыл бұрын
you should try the sahi algorithm
@deepakts8941
@deepakts8941 Жыл бұрын
@@abdurrahimbalta1015Sahi we have used we want our model to run quickly with less gpu usuage
@abdurrahimbalta1015
@abdurrahimbalta1015 Жыл бұрын
@@deepakts8941 okey, maybe try the efficent-net. i think best cpu object detector model
@robertocenci3834
@robertocenci3834 Жыл бұрын
Hi Aarohi, would it be possible to download your sample code used in the video? Thank you
@CodeWithAarohi
@CodeWithAarohi Жыл бұрын
Hi, This same code Ultralytics implemented in their latest ultralytics package. Check this video: kzbin.info/www/bejne/gZC6iqCpjs11e9k
@grayelearning772
@grayelearning772 9 ай бұрын
Good work. Please share the code
@CodeWithAarohi
@CodeWithAarohi 9 ай бұрын
Please email me at aarohisingla1987@gmail.com
@philipplagrange314
@philipplagrange314 Жыл бұрын
Is it possible that the background does not get a mask? It is currently displayed in purple
@CodeWithAarohi
@CodeWithAarohi Жыл бұрын
Yes it is possible.
@philipplagrange314
@philipplagrange314 Жыл бұрын
Can you show me how to do this? The background should still be visible, but without a mask. That would be really helpful!
@assiachahidi5162
@assiachahidi5162 Жыл бұрын
Thanks for your videos. Can you consider sharing your code please.
@grayelearning772
@grayelearning772 9 ай бұрын
Please share the code
@CodeWithAarohi
@CodeWithAarohi 9 ай бұрын
Please email me at aarohisingla1987@gmail.com
@盛毅
@盛毅 Жыл бұрын
where is the source code please??
@pearlmarysamuel4809
@pearlmarysamuel4809 Жыл бұрын
@world66699
@world66699 Жыл бұрын
# Extract desired outputs bboxes_xyxy = detection_pred[0].prediction.bboxes_xyxy.tolist() confidence = detection_pred[0].prediction.confidenceftolist() labels = detection_pred[0].prediction.labels.tolist() print("Bounding Boxes (xyxy):", bboxes_xyxy) print("Confidence:", confidence) print("Labels:", labels) bboxes_xyxy, confidence, labels TypeError: 'generator' object is not subscriptable
@shubhamrathod9969
@shubhamrathod9969 Жыл бұрын
Since the model outputs a generator. Convert the Generator to a list and then Extract the desired output. model_pred = list(model_nas.predict(image, conf = conf_threshold)._images_prediction_lst)
YOLO-NAS and StrongSORT | Object detection and tracking
13:31
Code With Aarohi
Рет қаралды 9 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
Auto Annotation for  generating segmentation dataset using YOLOv8 & SAM
14:10
YOLO-NAS Custom Object Detection | Fall Detection Using YOLO-NAS
23:25
Code With Aarohi
Рет қаралды 29 М.
Explaining the Segment Anything Model - Network architecture, Dataset, Training
13:02
Neural Breakdown with AVB
Рет қаралды 24 М.
YOLOv8: How to Train for Object Detection on a Custom Dataset
20:31
YOLOv8 Instance Segmentation on Custom Dataset | Windows & Linux
14:13
Build an Object Detector for Any Game Using YOLO
22:40
Moises de Paulo Dias
Рет қаралды 73 М.
YOLOv8 | Object Detection on a Custom Dataset using YOLOv8
17:41
Code With Aarohi
Рет қаралды 147 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН