Security Alarm System Project with Ultralytics YOLOv8 Object Detection | Episode 8

  Рет қаралды 14,694

Ultralytics

Ultralytics

Күн бұрын

Пікірлер: 82
@aryashinde6401
@aryashinde6401 5 ай бұрын
Thank you very much for this tutorial. It will be really helpful for me in my project. 😀
@Ultralytics
@Ultralytics 5 ай бұрын
Thank you for your feedback! We're glad to hear this :)
@Melo7ia
@Melo7ia 12 күн бұрын
🎶 Nicolai bringing beats with YOLOv8 detecting streets! I'm curious-how does the YOLOv8 tackle false positives in busier environments, like a jazzy club with lots of movement? Would love to riff on those groove challenges and solutions! 🎷
@Ultralytics
@Ultralytics 12 күн бұрын
Great question! 🎷 YOLOv8 uses advanced algorithms to minimize false positives, even in dynamic environments like a jazzy club. It leverages improved architecture and training techniques to enhance accuracy. For busy scenes, fine-tuning the model with specific data and adjusting confidence thresholds can help. Check out our guide for more insights: docs.ultralytics.com/guides/security-alarm-system/
@furkandemirel9595
@furkandemirel9595 8 ай бұрын
thnk you sir
@Ultralytics
@Ultralytics 8 ай бұрын
Most welcome
@Sasha-n2x
@Sasha-n2x 22 күн бұрын
Wow, YOLOv8 seems incredible for security systems! 🛡️ Have you encountered any real-world examples where object detection tech was abused or misused, and how can developers prevent such ethical dilemmas while advancing security? #TechWithResponsibility #YOLOv8Ponderings
@Ultralytics
@Ultralytics 22 күн бұрын
Great question! While object detection tech like YOLOv8 offers immense benefits, it can indeed be misused, such as for unauthorized surveillance or privacy invasion. To prevent such ethical dilemmas, developers should adhere to principles of AI ethics, including transparency, accountability, and privacy protection. Always ensure compliance with local laws and regulations, and consider implementing features like data anonymization and user consent mechanisms. For more on AI ethics, check out our AI Ethics guide www.ultralytics.com/glossary/ai-ethics. #TechWithResponsibility 🌐
@ForReal17720
@ForReal17720 4 ай бұрын
I want to do it with 10 classes using the model i trained is it possible?
@Ultralytics
@Ultralytics 4 ай бұрын
Yes, it's possible! The code is available at: docs.ultralytics.com/guides/security-alarm-system/#object-detection-and-alert-sender Thank you!!! Ultralytics Team!
@AxelRyder-q1b
@AxelRyder-q1b 2 ай бұрын
Whoa, Nicolai! This is some next-level security wizardry! Can YOLOv8 handle multiple people at once, and if so, how does it differentiate between authorized personnel and intruders? Thinking about sneaky conference rooms snags and office shenanigans-wouldn't wanna trigger alarms every 5 minutes, right? 😂?
@Ultralytics
@Ultralytics 2 ай бұрын
Absolutely, YOLOv8 can handle multiple people simultaneously! To differentiate between authorized personnel and intruders, you can integrate a facial recognition system alongside YOLOv8. This way, the system can identify and verify individuals before triggering any alarms. For more details, check out our guide on integrating YOLOv8 with other systems: docs.ultralytics.com/guides/security-alarm-system/. Happy securing! 🚀
@March_Awake
@March_Awake Жыл бұрын
Thank you for sharing
@Ultralytics
@Ultralytics 11 ай бұрын
Thanks for watching!
@BostonleierPlaysMC
@BostonleierPlaysMC 3 ай бұрын
How would this work if I'm trying to connect to a camera through the IP
@Ultralytics
@Ultralytics 3 ай бұрын
Well, the workflow will be the same, only you will need to replace the video file with the camera stream URL. For more information, you can explore: docs.ultralytics.com/modes/predict/#__tabbed_2_13 Thanks, Ultralytics Team!
@lovers_GTA
@lovers_GTA 11 ай бұрын
how we can include tracking also? I mean if I person detects only sending one email
@Ultralytics
@Ultralytics 11 ай бұрын
To track objects, you can utilize the `model.track` function instead of `model.predict`. Subsequently, you can send an email containing the tracked object IDs. For further details on object tracking with Ultralytics YOLOv8, you can refer to docs.ultralytics.com/modes/track/.
@AnilKumarPatra-f4f
@AnilKumarPatra-f4f 6 ай бұрын
How to add rtsp , what code change will be needed?
@Ultralytics
@Ultralytics 6 ай бұрын
You can load the stream effortlessly by passing the RTSP URL directly into the VideoCapture function! Thanks :)
@m033372
@m033372 2 ай бұрын
How does the YOLOv8 object detection compare to traditional security systems in terms of real-time accuracy and false positives? Has anyone integrated it into a home security setup yet?
@Ultralytics
@Ultralytics 2 ай бұрын
Great question! YOLOv8 excels in real-time accuracy and significantly reduces false positives compared to traditional security systems, thanks to its advanced object detection algorithms. Many users have successfully integrated YOLOv8 into home security setups, benefiting from its efficiency and reliability. For more details on integration and performance, check out our documentation at docs.ultralytics.com/guides/security-alarm-system/. If you have any specific issues or need further assistance, please ensure you're using the latest versions of `torch` and `ultralytics` and feel free to share more details! 🚀🔒
@juanperez000001
@juanperez000001 3 ай бұрын
Hello. Can you help me to use the code to run object detection on multiple video streams (rtsp) simultaneously? I tried with multithreading (ultralytics examples) but I'm new to python and can't get it.
@Ultralytics
@Ultralytics 3 ай бұрын
Hello! Sure, I can help you with that. Running object detection on multiple RTSP streams simultaneously using multithreading can be quite efficient. Below is an example of how you can achieve this using Ultralytics YOLO and Python's `threading` module. Here's a complete example: ```python import threading import cv2 from ultralytics import YOLO def run_tracker_in_thread(rtsp_url, model, stream_id): """ Runs object tracking on an RTSP stream concurrently using threading. Args: rtsp_url (str): The RTSP URL of the video stream. model (YOLO): The YOLO model object. stream_id (int): An identifier for the stream, used for display purposes. """ cap = cv2.VideoCapture(rtsp_url) # Open the RTSP stream while cap.isOpened(): ret, frame = cap.read() # Read a frame from the stream if not ret: break # Perform tracking on the frame results = model.track(frame, persist=True) annotated_frame = results[0].plot() # Display the annotated frame cv2.imshow(f"Stream {stream_id}", annotated_frame) if cv2.waitKey(1) & 0xFF == ord('q'): break cap.release() cv2.destroyAllWindows() # Load the YOLO model model = YOLO("yolov8n.pt") # Define the RTSP URLs for the streams rtsp_urls = [ "rtsp://username:password@ip_address:port/stream1", "rtsp://username:password@ip_address:port/stream2" ] # Create and start a thread for each RTSP stream threads = [] for i, rtsp_url in enumerate(rtsp_urls): thread = threading.Thread(target=run_tracker_in_thread, args=(rtsp_url, model, i), daemon=True) threads.append(thread) thread.start() # Wait for all threads to complete for thread in threads: thread.join() # Clean up and close windows cv2.destroyAllWindows() ``` ### Explanation: 1. **Function `run_tracker_in_thread`**: This function captures video frames from an RTSP stream and uses the YOLO model to perform object tracking. The results are displayed in a window. 2. **Loading the YOLO model**: The model is loaded once and shared across threads. 3. **RTSP URLs**: Replace the placeholders with your actual RTSP URLs. 4. **Thread Creation and Execution**: A thread is created for each RTSP stream, and the `run_tracker_in_thread` function is executed in each thread. 5. **Thread Management**: The main thread waits for all the tracker threads to complete before cleaning up. Feel free to adjust the code to fit your specific needs. For more detailed information, you can refer to our documentation at [Ultralytics Tracking Documentation](docs.ultralytics.com/modes/track/). Regards! Ultralytics Team
@javiermendezkaram
@javiermendezkaram Жыл бұрын
This is really useful, what would be your recommendation if I want to include an image of the box that detected the person?
@Ultralytics
@Ultralytics Жыл бұрын
Great idea! You can easily accomplish this by extracting the bounding box and employing numpy slicing to isolate the detected person within the image. Afterward, you could either send the image directly via email or provide a link to the stored image from your Python code.
@euphoricvai
@euphoricvai 7 ай бұрын
hey can i do this for multiple classes instead of just one
@Ultralytics
@Ultralytics 6 ай бұрын
Yes, indeed. You'll have to include a check for class names, like: ```python if classname == "player": # Send alert code ``` For more information, you can explore: docs.ultralytics.com/guides/security-alarm-system/#object-detection-and-alert-sender
@SiphoNtuli-g4g
@SiphoNtuli-g4g 4 ай бұрын
why does detection speed decrease over time?
@Ultralytics
@Ultralytics 4 ай бұрын
The speed of detection relies on the power and speed of the device. A superior GPU can execute inference quickly. Thank you!
@m.niharikareddy9249
@m.niharikareddy9249 8 ай бұрын
The explanation was pretty good. I'm doing a project where i have to send alert message to the client when the average no.of chickens are not moving for a perticular time, how could i change the code to get alert message
@Ultralytics
@Ultralytics 8 ай бұрын
It appears that your question is completely technical. We suggest posting your queries in our GitHub section for a more effective and detailed response: github.com/ultralytics/ultralytics Thanks Ultralytics Team!
@suryaveerkadyan7504
@suryaveerkadyan7504 11 ай бұрын
Hi in setting up detections for visualisation section IN Line 96 whats the exact code after (scene = frame, detections... )? Please reply because the whole code is breaking because of that!!!
@Ultralytics
@Ultralytics 11 ай бұрын
On line 96, the code draws a bounding box, and you can create this bounding box using Ultralytics Plotting. For more information, you can check the Ultralytics Implementation: github.com/ultralytics/yolov5/blob/dd9e3382c9af9697fb071d26f1fd1698e9be3e04/detect.py#L196
@omerkaya5669
@omerkaya5669 11 ай бұрын
I want to build an embedded system with Jetson Xavier NX. Is it possible to use it with YOLOv8 or YOLOv7? Some researchers say YOLOv8 is not suitable.
@Ultralytics
@Ultralytics 11 ай бұрын
Both Ultralytics YOLOv8 and YOLOv5 are beneficial for use in embedded systems. If enhanced speed is a priority, YOLOv5 can be a preferred choice.
@omerkaya5669
@omerkaya5669 11 ай бұрын
I'm working on real-time object detection. YOLOv5 and YOLOv8 . Which one do you recommend?@@Ultralytics
@Ultralytics
@Ultralytics 11 ай бұрын
YOLOv5
@tronauts1699
@tronauts1699 Жыл бұрын
Is it possible to use esp32-cam for the camera? And how to connect with esp32-cam?
@Ultralytics
@Ultralytics 11 ай бұрын
Certainly, the ESP32-CAM can be used as a camera source, although there are some considerations to keep in mind due to its resource limitations compared to more powerful systems. You'll need to ensure that the ESP32-CAM can send image data to a machine where the YOLOv8 model is running, as running YOLOv8 directly on an ESP32-CAM is not feasible due to hardware constraints. One common approach is to set up the ESP32-CAM to stream video over your network and then capture this stream on your computer for object detection with YOLOv8. This typically involves setting up a video stream using protocols like RTSP or HTTP on the ESP32-CAM and then configuring your YOLOv8 environment to use this stream as an input source. I hope this provides a general outline of what steps you would need to take to integrate ESP32-CAM with YOLOv8. If you have further questions or run into specific issues, feel free to ask.
@namirkhan8515
@namirkhan8515 6 ай бұрын
What does model.fuze() do ?
@Ultralytics
@Ultralytics 6 ай бұрын
model.fuse() in ultralytics is used to optimize inference performance by combining certain operations, such as convolutions and batch normalization, into a single fused operation for efficiency.
@EsemTechServices
@EsemTechServices 11 ай бұрын
great stuff right there! can you help with a program to detect traffic congestion from a video on a particular area of interest. I'm trying to base the congestion on the speed the vehicles are travelling, traffic density and the gap between the vehicles in an area of interest.
@Ultralytics
@Ultralytics 11 ай бұрын
Yes you can find more help from the community in our GitHub or Discord at ultralytics.com/discord
@hulwanulazka1964
@hulwanulazka1964 9 ай бұрын
great video, i want to ask how to send different emails each class? i have 2 classes and the code send me email no matter which classes, thanks for your answer, have a nice day!
@Ultralytics
@Ultralytics 9 ай бұрын
You will simply need to integrate second email in code. The detailed method for generation of new email and password is available in our Docs: docs.ultralytics.com/guides/security-alarm-system/ Thanks Ultralytics Team!
@dhineshkumard7639
@dhineshkumard7639 Жыл бұрын
can u add a document of this code?
@Ultralytics
@Ultralytics Жыл бұрын
Absolutely, we plan to include project documentation in the near future on our docs website: docs.ultralytics.com/
@nafismahardiika7417
@nafismahardiika7417 11 ай бұрын
is it possible to change output from gmail to whatsapp?
@Ultralytics
@Ultralytics 11 ай бұрын
Using a mail server won't make it possible, but you can explore the WhatsApp API and integrate it to meet your specific needs.
@nafismahardiika7417
@nafismahardiika7417 11 ай бұрын
@@Ultralytics i see thx mate, anyway can i see full line on 96 cuz some line got close by picture
@Ultralytics
@Ultralytics 11 ай бұрын
On line 96, the code draws a bounding box, and you can create this bounding box using Ultralytics Plotting. For more information, you can check the Ultralytics Implementation: github.com/ultralytics/yolov5/blob/dd9e3382c9af9697fb071d26f1fd1698e9be3e04/detect.py#L196
@nafismahardiika7417
@nafismahardiika7417 11 ай бұрын
@@Ultralytics thx for your help mate
@Ultralytics
@Ultralytics 2 ай бұрын
You're welcome! If you have any more questions, feel free to ask. Happy coding! 😊
@euphoricvai
@euphoricvai 10 ай бұрын
how do i edit this so i can send out a notification (using plyer) for an image not having certain classes present and not real time detection. i have the trained model and the motification code but im having problems integrating the two
@Ultralytics
@Ultralytics 10 ай бұрын
Could you provide the error logs? For more details about the code, we suggest referring to the GitHub Issues section. github.com/ultralytics/ultralytics/issues
@Ultralytics
@Ultralytics 2 ай бұрын
Hi there! 👋 It sounds like an interesting project! To help you better, could you provide more details on the specific issues you're encountering when integrating your trained model with the notification code? For example, any error messages or code snippets would be helpful. In the meantime, ensure you're using the latest versions of `torch` and `ultralytics`. You can upgrade them using: ` pip install --upgrade torch ultralytics ` For more guidance, check out our documentation: Ultralytics Docs docs.ultralytics.com/guides/security-alarm-system/. Feel free to share more details so we can assist you further! 😊
@suryaveerkadyan7504
@suryaveerkadyan7504 11 ай бұрын
Hey, while the webcam cam detection happens, how do I replace the index numbers with the object names? Please help.
@Ultralytics
@Ultralytics 11 ай бұрын
The results object contains a list of detection data. You can utilize the provided code to extract the name and subsequently use it as a label for bounding boxes. """ results = model.predict(frame) boxes = results[0].boxes.xywh.cpu() clss = results[0].boxes.cls.cpu().tolist() names = results[0].names for box, cls in zip(boxes, clss): x, y, w, h = box label = str(names[cls]) # ... later you can change things according to your needs """
@oscar920921
@oscar920921 10 ай бұрын
Thank you , share the code please.
@Ultralytics
@Ultralytics 10 ай бұрын
We are working on code and creating colab notebooks, we will share them soon! Thanks
@ramanathreddyg7212
@ramanathreddyg7212 6 ай бұрын
can i get the code
@Ultralytics
@Ultralytics 6 ай бұрын
The code is available at: docs.ultralytics.com/guides/security-alarm-system/ Thanks
@ramanathreddyg7212
@ramanathreddyg7212 6 ай бұрын
@@Ultralytics thank u
@Ultralytics
@Ultralytics 2 ай бұрын
You're welcome! 😊 If you have any more questions, feel free to ask!
@garimasaigal1327
@garimasaigal1327 11 ай бұрын
how can we modify it, for using it to detect humans in disasters?
@Ultralytics
@Ultralytics 11 ай бұрын
You have the option to fine-tune the models to detect humans. If they are located in disaster-prone areas, you can set up email notifications or activate alarms as needed. Note: It's important to note that detecting and monitoring disasters is a complex task, often involving the integration of various techniques and workflows.
@garimasaigal1327
@garimasaigal1327 11 ай бұрын
@@Ultralytics is yolov8 trained for such, or we need to train with a different dataset?
@Ultralytics
@Ultralytics 2 ай бұрын
YOLOv8 is a versatile model, but for specific applications like detecting humans in disaster scenarios, you might need to fine-tune it with a specialized dataset. You can start with a pre-trained YOLOv8 model and then train it on a dataset that includes images of humans in disaster contexts. For guidance on training custom models, check out our documentation: docs.ultralytics.com/guides/security-alarm-system/.
@imadahmad104
@imadahmad104 11 ай бұрын
link to the code please? to leverage
@Ultralytics
@Ultralytics 10 ай бұрын
Thanks for the feedback! We are working to provide accompanying code for future KZbin videos :)
@be_a_changer9859
@be_a_changer9859 10 ай бұрын
Can i get the code please!
@Ultralytics
@Ultralytics 10 ай бұрын
The code will be released next week! keep your eyes for updates on docs.ultralytics.com/
@dawoodhaniefs1433
@dawoodhaniefs1433 11 ай бұрын
where do i find this code?I want this code pls
@Ultralytics
@Ultralytics 11 ай бұрын
We'll be providing the code for all modules, though it may take a few days. Thank you.
@dawoodhaniefs1433
@dawoodhaniefs1433 11 ай бұрын
@Ultralytics will you help me? I want this code today i have project submission
@Ultralytics
@Ultralytics 2 ай бұрын
You can find the code for the security alarm system project here: docs.ultralytics.com/guides/security-alarm-system/. Best of luck with your project! 🚀
@HessaAlRasheed
@HessaAlRasheed 10 ай бұрын
Can I get the code, please? Thank you
@Ultralytics
@Ultralytics 10 ай бұрын
The code will soon be accessible in our documentation. Thanks
Build an Object Detector for Any Game Using YOLO
22:40
Moises de Paulo Dias
Рет қаралды 56 М.
У ГОРДЕЯ ПОЖАР в ОФИСЕ!
01:01
Дима Гордей
Рет қаралды 8 МЛН
He bought this so I can drive too🥹😭 #tiktok #elsarca
00:22
Elsa Arca
Рет қаралды 59 МЛН
Track & Count Objects using YOLOv8 ByteTrack & Supervision
26:11
Real-Time Object Detection in 10 Lines of Python Code on Jetson Nano
26:18
Yolov8 object detection + deep sort object tracking | Computer vision tutorial
34:33
Computer vision engineer
Рет қаралды 94 М.
AI Pioneer Shows The Power of AI AGENTS - "The Future Is Agentic"
23:47
YOLOv10 is Now Integrated into Ultralytics
10:30
Nicolai Nielsen
Рет қаралды 5 М.
Object Detection in 10 minutes with YOLOv5 & Python!
10:45
Rob Mulla
Рет қаралды 261 М.