In line detections=detections[detections.class_id==0] , the error is coming AttributeError: module 'numpy' has no attribute 'bool'. `np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here. i tried all the methods can u pls help !
Just wanted to say a big thanks for the tutorial. It was super helpful! And, btw, you rock! 😎 So, anything else you wanna show us? Here's my wishlist: * Show object Track ID * Smooth path like in Data From Sky 🔥
Nice work you changed the poygon and it looks good btw. Lots of effort put in by @SkalskiP. I was watching him on twitch while he was working on last demo. Nice work and thanks for sharing :)
Hi :) Oh this is so sweet. I feel weird when people praise me, but at the same time thank you very much for that. It's nice to know that people see substance in what I do. And yeeees... When you see me use that library on YT video everything looks so effortless, but Twitch stream tells the real story! Blood sweat, tiers and NumPy! Haha Btw I'll stream today too!
Thanks, this is very helpful, how can I get the total of number of the detected instances? I'm trying to count the total number of fish fingerlings in a basin using YOLOv7 instance segmentation.
Hello sir @@SkalskiP, I'm interested in counting the individual objects seen in the whole video, the video input will be at least 10 seconds. My model needs to match the correct count of the total number of fingerlings in a basin. I'm done with the instance segmentation but got stuck on displaying the total number of fish detected. 😁
Hello Brother, do you have any idea about ? Object removed does not work in automated checkout in zone based detection. If we define zone from capture frame of top camera, and object is placed outside of one zone boundary. zone boundary lies between refrigerator and outside position. When object is removed from zone, its still show object added into zone.
thank u so much ❤ , but i cant execute the full video, "AttributeError: module 'numpy' has no attribute 'bool'." same error in the track&count object video , i changed from np.float/np.bool to float/float , please can u help me !
Nice! This reminds me of a roboflow universe project where someone managed to use the predefined polygon on feeding area in an aquarium to count and track incoming dwarf shrimp
This is so awesome man, thanks so much for making this. I'm making an analysis tool for Beach Volleyball with what i'm learning from your videos! Could you do another zone analysis for Soccer where you detect if a player is offside?
Counting itself not :/ Installing and making the model work with the rest of the tools. Yes. YOLOv7 does not have any pip package. All you can do is run inference through the script.
@@SkalskiP oh i see how about the processor AMD is ok and memory 15GB enough? i tried the cloud it used 8GB but the amount of training data kinda small
We do not have that feature build in yet... So there are two things you can do. Add feature request here: github.com/roboflow/supervision/issues or add your question in our discussions page github.com/roboflow/supervision/discussions ;)
The processing pipeline with Supervision stays the same regardless of the model. The main problem is to run YOLOv7 in SDK mode. I suggest you take a look at this project to run YOLOv7 github.com/kadirnar/yolov7-pip
12:47 Person excluded by the trolley. Possible Solution: add pose estimation and make the bounding box of person enlarged by this pose? Havent tried yet. Will update here when it works.
Hi, it is Peter from the video 👋That is one of the possible solutions. I think we should go for something simpler first. Try different model size for example. Notice that I used yolov8s model. I'd test yolov8l or yolov8x first.
@@SkalskiP Thank you. I mean, integrate the Track ID into the supervision. So we can just add track=true to the argument. As for smoothed path, I saw in your ByteTrack video that the path it draws is rough. It would be beautiful if we can draw the track in smoothed curve. Like this: th-cam.com/video/iraORJbiB7w/w-d-xo.html
thanks for making such useful content like this! i was wondering, how do we define the polygon zone? is there a technique to be used to get the specific number of x & y val?
Hi 👋it's Peter from the video. What I like to do is to load the image to some editor like Gimp and design my zone there. I'm actually a bit unhappy that I didn't show that on the video. I know that we plan to release a short blog post / video showing people how they can do it. Maybe even build some interactive tool in Python to make it even easier.
@@SkalskiP Hi Peter, would love to understand about it through the planned short blog post! thanks for making these videos, and thank you for your reply!
@Hazim Bajammal We have just launched PolygonZone, an open-source web application for calculating the coordinates of polygons on an image: blog.roboflow.com/polygonzone/ Let us know if this is helpful to you!
I'm working on project where I plan to estimate a behavior of separate objects by tracking directions and speed of movement and recognize some specific behavioral patterns. I'm new in that field and I have analyzed your colab notebooks, they are very Very VERY helpful. I need your suggestions. Based on your tracking and counting tutorial presented in previous video I collect track coordinates and can draw a paths of every moving objects, postprocess them and extract useful information. That project was based on supervision 0.1.0, yolov8, ByteTrack. Now I plan to track behaviour of moving objects i a polygon and in polygon example you use supervision 0.2.0, syntax was a little bit changed. What do you suggest: stay on supervision 1 and add polygons to previous project. Or move to this video project with supervision 2 and add ByteTrack to it?
I was waited that something like that will happen… supervision is still not officially released. And the syntax and names may change… I’m so sorry if that caused you some trouble. I suggest to stay on the version that is as new as possible. I’ll do my best to help you out.
@@Roboflow Man, it works, I can track and count and capture the paths of different objects in different zones, super-duuuuuper. You are amazing, YOLOv8+Supervision+ByteTrack+Peter = powerful toolkit.
That’s great to hear! As for your question, not yet, but we have such feature on our roadmap. You can still do it using our zones, but it would require work on your side.
Hello Brother ! Thanks a lot for the video , I just want some help regarding on how we can trial and error for the polygon zones. I just can't figure out how to make one when I tried on my own for some other stock video but also unlike yours I can't see any coordinates in my images when I run them.. I believe it will take to next level If I'm able to figure that part out. Kudos to your work keep making content !
It is but than you don’t use PolygonZoneAnnotator. You use PolygonZone to trigger and count and then use draw utils to draw zone “manually” and text in custom location.
If you want to calculate the coordinates of polygon points, we have just open-sourced a tool to make his easier! blog.roboflow.com/polygonzone/ Let us know if this is helpful to you!
Hi. Nice video. Could you please also explain if someone wants to have a total number of passengers? e.g. in the platform video, how would we count the total number of passengers at the platform?
Thanks, it was so amazing. I have one question. I'll be so grateful if you could help: 1) I watched the video that explained how to train yolov5 with the custom dataset. I used that notebook and exported the best.pt file, containing model weights. My question is: how to use it for inference? - I used model = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt') # PyTorch but It loads the original .pt file, not my custom one.
Hi 👋! It's Peter from the video. I took a look in YOLOv5 docs and this is what I found: model = torch.hub.load('ultralytics/yolov5', 'custom', path='path/to/best.pt'). Looks exactly like the line you pasted. Are you sure that 'best.pt' is sufficient as path? I'll try to pass global path to that file. If that doesn't help. Let me know and I'll try to help.
brother, error comes like AttributeError: module 'numpy' has no attribute 'bool'. `np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
@@Roboflow Oops, thanks for her answer. It will be locally because it will be in an application built by me. I think remotely would lose even more quality.
Thank you very much for the videos, they are very useful! If it is worth a suggestion, it would be nice to use SLAM and object detection for OAK-D. ( By the way I am subscribed ;)
Hi 👋! It's Peter from the video. Thanks a lot for the trust. I'll do my best to keep you entertained and informed. OAK is for sure on my list of projects to do soon.
Congrats! It's really nice and instructive work, but i have a question. How would that be possible, if I want to skip some frames(vid_stride) in the video because of slow video processing? Like, look once in every 4 frames.
Hi! It is relatively easy to implement, but I'll also add that idea to our roadmap. As for your question. Could you post it here: github.com/roboflow/supervision/discussions/categories/q-a YT comments are quite terrible when it comes to code discussions. I'll try to help you.
This was very cool. Can you make a video on distance measurement between the detections using a threshold showing the distance. it would be very cool like clear idea of how we can show social distancing and other cool stuffs?!
In line
detections=detections[detections.class_id==0] , the error is coming AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
i tried all the methods can u pls help !
any solution? stuck on the same!
same😔
been looking forward to this one!
Hi it's Peter from video ;) Thanks for patience!
Great video for learning the YOLOv8, thanks.
Great to hear that! 👋
Just wanted to say a big thanks for the tutorial. It was super helpful! And, btw, you rock! 😎 So, anything else you wanna show us? Here's my wishlist:
* Show object Track ID
* Smooth path like in Data From Sky 🔥
Hi once again :) Did you saw this tutorial: th-cam.com/video/OS5qI9YBkfk/w-d-xo.html We've done tracking id there. What do you mean by Smooth path?
legend! keep up the good work!
Thanks a lot 🙏🏻
Very good tutorials you are publishing. Thanks!
Nice work you changed the poygon and it looks good btw.
Lots of effort put in by @SkalskiP. I was watching him on twitch while he was working on last demo. Nice work and thanks for sharing :)
Hi :) Oh this is so sweet. I feel weird when people praise me, but at the same time thank you very much for that. It's nice to know that people see substance in what I do. And yeeees... When you see me use that library on YT video everything looks so effortless, but Twitch stream tells the real story! Blood sweat, tiers and NumPy! Haha Btw I'll stream today too!
Thanks, this is very helpful, how can I get the total of number of the detected instances? I'm trying to count the total number of fish fingerlings in a basin using YOLOv7 instance segmentation.
Hi it's Peter from the video! 👋Are you interested in total count of individual objects seen in the whole video? Or total visible right now?
Hello sir @@SkalskiP, I'm interested in counting the individual objects seen in the whole video, the video input will be at least 10 seconds. My model needs to match the correct count of the total number of fingerlings in a basin. I'm done with the instance segmentation but got stuck on displaying the total number of fish detected. 😁
@@christian.js.1997 did you managed to run the tracker on the whole video?
Oh thanks, I'll try to run it, is the tracker compatible with YOLOv7?
Hello Brother, do you have any idea about ? Object removed does not work in automated checkout in zone based detection. If we define zone from capture frame of top camera, and object is placed outside of one zone boundary. zone boundary lies between refrigerator and outside position. When object is removed from zone, its still show object added into zone.
It is a bit hard to tell from this description. I recommend you open new discussion here: github.com/roboflow/supervision/discussions
thank u so much ❤ , but i cant execute the full video, "AttributeError: module 'numpy' has no attribute 'bool'." same error in the track&count object video , i changed from np.float/np.bool to float/float , please can u help me !
This is so cool, thanks for sharing
My pleasure
Thank you so much sir , this is very helpful for my project. Once again a big thanks for providing source code too .
Sorry, I want to ask if count objects can be done on an image.?
Greetings.
I wanted to know if there is anyway to fill the polygons with a specific color?
How would i go about measuring the duration of each class that appears in a zone.
Nice! This reminds me of a roboflow universe project where someone managed to use the predefined polygon on feeding area in an aquarium to count and track incoming dwarf shrimp
really cool stuff!
Thanks a lot!
This is so awesome man, thanks so much for making this. I'm making an analysis tool for Beach Volleyball with what i'm learning from your videos!
Could you do another zone analysis for Soccer where you detect if a player is offside?
Thanks a lot! Offside is actually not that easy to make. I tried haha
i clicked the wrng link, ended up cloning a github suppository
Thank you! But one quick question, If needs to detect another object, I need to create a new dataset and new train?
Regards
Good question! If you plan to use models like YOLO than yes. There are also zero shot detectors. But much slower… Much Much slower…
the counting functionality are working in a specific zone or can i move the camera around to count people?
They are static on the frame. Moving the zone is a lot more complicated to implement.
@@Roboflow can you give some guidelines how to start working on it in order to achieve that?
@@gbo10001 you mean build zones that could work for moving camera?
@@Roboflow making zones is the only way to count objects in a video?
@@gbo10001 you want to count objects in the whole video? You don’t need zones to do that.
Is there moving zone annotator in supervision
Is counting using yolov7 model difficult than using yolov8 model.
Counting itself not :/ Installing and making the model work with the rest of the tools. Yes. YOLOv7 does not have any pip package. All you can do is run inference through the script.
Thank you from Manhattan ©2024
You welcome!
H brother currently im using a laptop can you suggest a computer spec that run it locally
Hi it is Peter from the video :) It is pretty hard question. I have RTX 3080, and depending on the configuration I can get even 80 fps on it.
@@SkalskiP oh i see how about the processor AMD is ok and memory 15GB enough? i tried the cloud it used 8GB but the amount of training data kinda small
Just amazing what supervision is becoming!
I was wondering howto combine this with tracking. Count how many people visited inside polygon?
Hi it is Peter from the video! Reading comments like this makes me super excited.
We do not have that feature build in yet... So there are two things you can do. Add feature request here: github.com/roboflow/supervision/issues or add your question in our discussions page github.com/roboflow/supervision/discussions ;)
please do you have any idea how can i do this with yolov7
The processing pipeline with Supervision stays the same regardless of the model. The main problem is to run YOLOv7 in SDK mode. I suggest you take a look at this project to run YOLOv7 github.com/kadirnar/yolov7-pip
how can i work this on vs code..? is it posiible..? sir plz reply
12:47 Person excluded by the trolley. Possible Solution: add pose estimation and make the bounding box of person enlarged by this pose? Havent tried yet. Will update here when it works.
Hi, it is Peter from the video 👋That is one of the possible solutions. I think we should go for something simpler first. Try different model size for example. Notice that I used yolov8s model. I'd test yolov8l or yolov8x first.
@@SkalskiP Thank you. I mean, integrate the Track ID into the supervision. So we can just add track=true to the argument.
As for smoothed path, I saw in your ByteTrack video that the path it draws is rough. It would be beautiful if we can draw the track in smoothed curve. Like this: th-cam.com/video/iraORJbiB7w/w-d-xo.html
thanks for making such useful content like this!
i was wondering, how do we define the polygon zone? is there a technique to be used to get the specific number of x & y val?
Hi 👋it's Peter from the video. What I like to do is to load the image to some editor like Gimp and design my zone there. I'm actually a bit unhappy that I didn't show that on the video. I know that we plan to release a short blog post / video showing people how they can do it. Maybe even build some interactive tool in Python to make it even easier.
@@SkalskiP Hi Peter, would love to understand about it through the planned short blog post! thanks for making these videos, and thank you for your reply!
@Hazim Bajammal We have just launched PolygonZone, an open-source web application for calculating the coordinates of polygons on an image: blog.roboflow.com/polygonzone/
Let us know if this is helpful to you!
Hi
is there a way to do all this in vscode
I'm working on project where I plan to estimate a behavior of separate objects by tracking directions and speed of movement and recognize some specific behavioral patterns. I'm new in that field and I have analyzed your colab notebooks, they are very Very VERY helpful. I need your suggestions. Based on your tracking and counting tutorial presented in previous video I collect track coordinates and can draw a paths of every moving objects, postprocess them and extract useful information. That project was based on supervision 0.1.0, yolov8, ByteTrack. Now I plan to track behaviour of moving objects i a polygon and in polygon example you use supervision 0.2.0, syntax was a little bit changed. What do you suggest: stay on supervision 1 and add polygons to previous project. Or move to this video project with supervision 2 and add ByteTrack to it?
I was waited that something like that will happen… supervision is still not officially released. And the syntax and names may change… I’m so sorry if that caused you some trouble. I suggest to stay on the version that is as new as possible. I’ll do my best to help you out.
@@Roboflow dzięki, za poradę. I tak wiele mi pomogleś. Pozdrawiam z Wilna :)
@@vcarvewood4545 pozdrawiam ;)
@@Roboflow Man, it works, I can track and count and capture the paths of different objects in different zones, super-duuuuuper. You are amazing, YOLOv8+Supervision+ByteTrack+Peter = powerful toolkit.
@@vcarvewood4545 I love to hear that 💜
How to access the model in Roboflow????
found it really helpful, can we find the time spent by certain person in certain spot market space ?? is it ijclushsive in yolo v5?
That’s great to hear! As for your question, not yet, but we have such feature on our roadmap. You can still do it using our zones, but it would require work on your side.
Could you please explain how to count objects detected in images?
Thanks man,
I have a question that, can we find out the direction of the people join the polygon or go out the polygon
I want to draw the image recognition zone as I want. Is it possible?
Hello Brother ! Thanks a lot for the video , I just want some help regarding on how we can trial and error for the polygon zones. I just can't figure out how to make one when I tried on my own for some other stock video but also unlike yours I can't see any coordinates in my images when I run them.. I believe it will take to next level If I'm able to figure that part out. Kudos to your work keep making content !
Hi bro..Thanks for your tutorial. I have a question. Is it possible to move the counter to other locations on the frame?
It is but than you don’t use PolygonZoneAnnotator. You use PolygonZone to trigger and count and then use draw utils to draw zone “manually” and text in custom location.
@@Roboflow Thank for the reply bro👍
@@amalks8676 👍
thanks for your amazing videos
i was wondering how to get coordinates of an object using cv?
Hi it is Peter from the video. Could you be a bit more specific? What do you mean using OpenCV?
@@SkalskiP not specially opencv
with any framework
just export x y z coordinates
@@shahinamini7047 are you interested in whole bbox or some specific point like center?
If you want to calculate the coordinates of polygon points, we have just open-sourced a tool to make his easier!
blog.roboflow.com/polygonzone/
Let us know if this is helpful to you!
This is so awesome! Could you do one for oil palm tree counting / detection ?
Thank you for your teach. But, your link do not response. How can I get your code?
Link to code is in the description. I just checked and the link works :)
@@Roboflow Yes, I did. Thank you...
Hi. Nice video. Could you please also explain if someone wants to have a total number of passengers? e.g. in the platform video, how would we count the total number of passengers at the platform?
Hi 👋🏻! It is on my TODO. We will add more Supervision videos soon.
@@Roboflow thanks i am waiting and i am also working on it.
@@Exploring_World247 let us know how it goes :)
Thanks, it was so amazing.
I have one question. I'll be so grateful if you could help:
1) I watched the video that explained how to train yolov5 with the custom dataset. I used that notebook and exported the best.pt file, containing model weights. My question is: how to use it for inference?
- I used model = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt') # PyTorch
but It loads the original .pt file, not my custom one.
Hi 👋! It's Peter from the video. I took a look in YOLOv5 docs and this is what I found: model = torch.hub.load('ultralytics/yolov5', 'custom', path='path/to/best.pt'). Looks exactly like the line you pasted. Are you sure that 'best.pt' is sufficient as path? I'll try to pass global path to that file. If that doesn't help. Let me know and I'll try to help.
how to take video from webcam?
Take a look at this vid: th-cam.com/video/QV85eYOb7gk/w-d-xo.html
How to use images instead of video?
brother, error comes like
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
Thanks for the video friend, very enlightening. If I want to implement this technique on android to detect objects from the cell phone?
Hi, thanks a lot! And you would like to process the video locally or transfer it to server for processing?
@@Roboflow Oops, thanks for her answer. It will be locally because it will be in an application built by me. I think remotely would lose even more quality.
@@jonatapaulino You would need to convert your model to TensorFlow Light, and you should be able to run it on android
@@Roboflow I already did that, but what happens is the loss of fps, oh, I don't know how to overcome this loss.
@@jonatapaulino what is the FPS you get?
Thank you very much for the videos, they are very useful! If it is worth a suggestion, it would be nice to use SLAM and object detection for OAK-D. ( By the way I am subscribed ;)
Hi 👋! It's Peter from the video. Thanks a lot for the trust. I'll do my best to keep you entertained and informed. OAK is for sure on my list of projects to do soon.
Congrats! It's really nice and instructive work, but i have a question. How would that be possible, if I want to skip some frames(vid_stride) in the video because of slow video processing? Like, look once in every 4 frames.
Hi! It is relatively easy to implement, but I'll also add that idea to our roadmap. As for your question. Could you post it here: github.com/roboflow/supervision/discussions/categories/q-a YT comments are quite terrible when it comes to code discussions. I'll try to help you.
Can you make a video on person re identification.
Thanks for the video! so useful. Can we use Supervision to only convert different annotation formats? like PASCAL VOC to yolo or the other way.
how about tracking one person throught different zones ?
great video btw 😮🎉
@@sugaryxo thanks a lot. We do not support that yet in Supervision but it is possible to write custom code and do it.
thank you very much for your wonderfull video!, so can you show me how to play the result video after detect!!, i can't do it :( :(
Are you using Google Colab?
@@Roboflow yes sir, it just show imagine
@@thanhtrungnguyen6853 that should work just fine: stackoverflow.com/questions/49394737/exporting-data-from-google-colab-to-local-machine
NameError: name 'MARKET_SQUARE_VIDEO_PATH' is not defined
Looks like you did not run all notebooks cells. The value of `MARKET_SQUARE_VIDEO_PATH` is set in one of the top cells.
@@Roboflow Thank you, will check
@@VictoriaAlfredSmythe let me know if it worked!
👏👏👏👏👏
Takk
This was very cool. Can you make a video on distance measurement between the detections using a threshold showing the distance. it would be very cool like clear idea of how we can show social distancing and other cool stuffs?!
We have distance calculation on our timeline. But I’m afraid... that most likely won’t happen to fast.
Day 1
is it possible to identify type and quantity of inventory in a shop?
Yup! With good camera angles and high resolution it is 100% possible. I worked on projects like that.
Do video on visual prompt from landingai
I'll add that to the long list :)