<< return to Vizycam.com

User Tools

Site Tools


wiki:object_detector_app

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
wiki:object_detector_app [2022/10/06 21:11]
vizycam [Customized handlers]
wiki:object_detector_app [2022/10/07 11:25]
vizycam [Customized handlers]
Line 14: Line 14:
 Begin by turning on your Vizy and pointing your browser to it.  (Please refer to the [[wiki:​vizy_getting_started|getting started guide]] if you need help with connecting to your Vizy, etc.)  Run the Object Detector application by clicking on the ☰ icon in the upper right corner and selecting **Apps/​examples**. ​ Then scroll over to Object Detector in **Apps**, then click on **Run**.  ​ Begin by turning on your Vizy and pointing your browser to it.  (Please refer to the [[wiki:​vizy_getting_started|getting started guide]] if you need help with connecting to your Vizy, etc.)  Run the Object Detector application by clicking on the ☰ icon in the upper right corner and selecting **Apps/​examples**. ​ Then scroll over to Object Detector in **Apps**, then click on **Run**.  ​
  
-FIXME+{{wiki:​image_1212.jpg?​350}}
  
 The Object Detector application takes several seconds to start up.  You'll be presented with a screen similar to below. ​ The image at the top of the screen is the live video feed of what Vizy sees.  ​ The Object Detector application takes several seconds to start up.  You'll be presented with a screen similar to below. ​ The image at the top of the screen is the live video feed of what Vizy sees.  ​
  
-FIXME+{{wiki:​image_1211.jpg?​600}}
  
-To test, you can present various objects such as a fork, spoon, ​bottle, cup, and yourself (person).  ​+To test, you can present various objects such as a bottle, cup, scissors, and yourself (person).  Bear in mind that some objects (such as forks and spoons) rely to some degree on contextual cues (such as tables and plates). ​ You can adjust the detection sensitivity (see section on [[#Controls and Settings|Controls and Settings]] depending on how many false negative detections (increase sensitivity) or false positive detections (decrease sensitivity).  ​
  
-FIXME+{{wiki:​image_1209.jpg?​600}}
  
 ==== Media Queue ==== ==== Media Queue ====
Line 28: Line 28:
 You'll notice that Vizy will keep track of recently detected objects by displaying a picture and timestamp of the detected object in the media queue as shown.  ​ You'll notice that Vizy will keep track of recently detected objects by displaying a picture and timestamp of the detected object in the media queue as shown.  ​
  
-FIXME+{{wiki:​image_1210.jpg?​700}}
  
 Vizy keeps track of each detected object between frames and does its best to determine when objects first enter the scene and when they leave the scene. ​ When an object leaves the scene, Vizy will pick a "​good"​ picture and add it to the media queue. ​ This way you can get a quick sense of recent activity by scrolling through the media queue'​s pictures. ​   ​ Vizy keeps track of each detected object between frames and does its best to determine when objects first enter the scene and when they leave the scene. ​ When an object leaves the scene, Vizy will pick a "​good"​ picture and add it to the media queue. ​ This way you can get a quick sense of recent activity by scrolling through the media queue'​s pictures. ​   ​
Line 41: Line 41:
 Clicking on **Settings** will bring up the Settings dialog.  ​ Clicking on **Settings** will bring up the Settings dialog.  ​
  
-FIXME 400+{{wiki:​image_1208.jpg?​400}}
  
   * **Detection sensitivity**:​ Increasing the sensitivity will result in more detections, but possibly more false positive detections. ​ Decreasing the sensitivity will result in fewer detections, but possibly more false negative detections.  ​   * **Detection sensitivity**:​ Increasing the sensitivity will result in more detections, but possibly more false positive detections. ​ Decreasing the sensitivity will result in fewer detections, but possibly more false negative detections.  ​
   * **Enabled classes**: Check the checkbox of object classes that you're interested in and clear the checkbox of the classes that you're not interested in.  The enabled classes will be logged in the media queue.   * **Enabled classes**: Check the checkbox of object classes that you're interested in and clear the checkbox of the classes that you're not interested in.  The enabled classes will be logged in the media queue.
-  * **Trigger classes**: Check the checkbox of object classes that you want to trigger events and clear the checkbox of the classes that you don't want to trigger events. ​ See the section ​FIXME+  * **Trigger classes**: Check the checkbox of object classes that you want to trigger events ​-- in particular, texting a picture of the detected object -- and clear the checkbox of the classes that you don't want to trigger events. ​ See the section ​on [[#​Texting|Texting]]
-  * **Upload to Google Photos**: Check this if you want the media items in the media queue to be uploaded to Google Photos. ​ Google services need to be configured, however. ​ See the section on [[wiki:​birdfeeder_app2#​Configuring Google services|configuring ​Google services]]. ​   ​+  * **Upload to Google Photos**: Check this if you want the media items in the media queue to be uploaded to Google Photos. ​ Google services need to be configured, however. ​ See the section on [[#​Configuring Google services|Configuring ​Google services]]. ​   ​
  
 ==== Configuring Google services ==== ==== Configuring Google services ====
Line 57: Line 57:
 ==== Texting ==== ==== Texting ====
  
-Vizy's texting service allows Vizy to send you updates (typically to your phone). ​ For example, Vizy can text pictures of objects that you're interested in (see trigger classes in [[#Settings dialog|settings]] and the picture below, from the Telegram smartphone app).+Vizy's texting service allows Vizy to send you updates (typically to your phone). ​ For example, Vizy can text pictures of objects that you're interested in that are set in **Trigger classes** ​(see [[#Settings dialog|settings]] and the picture below, from the Telegram smartphone app).
  
-FIXME 300+{{wiki:​img_4225.jpg?​300}}
  
-Or you can ask it to show you pictures of the most recent detections ([[#Text commands|see text commands]] below). ​ One of the advantages of texting is that you can interact with your Vizy from practically anywhere as long as your Vizy has a network connection. ​ It's also quick! ​   ​+Or you can ask it to show you pictures of the most recent detections (see [[#Text commands|Text commands]] below). ​ One of the advantages of texting is that you can interact with your Vizy from practically anywhere as long as your Vizy has a network connection. ​ It's also quick! ​   ​
  
 === Configuring texting === === Configuring texting ===
Line 71: Line 71:
 Currently, the only text command that the Object Detector supports is **mrm** (most recent media). For example, to get information (description and picture) of the most recent detection: Currently, the only text command that the Object Detector supports is **mrm** (most recent media). For example, to get information (description and picture) of the most recent detection:
  
-FIXME 300+{{wiki:​img_4227.jpg?​300}}
  
 Or you can get the N most recent detections by adding a number: Or you can get the N most recent detections by adding a number:
  
-FIXME 300+{{wiki:​img_4228.jpg?​300}}
  
 ===== Customized handlers ===== ===== Customized handlers =====
Line 81: Line 81:
 For more advanced users who want to add their own custom features, the Object Detection application has handler code for various events and for text messages. ​ The handler code is in ''/​home/​pi/​vizy/​apps/​object_detector/​handlers.py''​. ​ Note, you can bring up the handler code easily from [[wiki:​vizy_editor#​Text editor|Vizy'​s built-in text editor]] by clicking on the ☰ button in the text editor and selecting ''​handlers.py''​. ​ Note also, once you change ''​handlers.py''​ you can simply click reload/​refresh on your browser and Vizy will automatically restart the application and your code changes will take effect. For more advanced users who want to add their own custom features, the Object Detection application has handler code for various events and for text messages. ​ The handler code is in ''/​home/​pi/​vizy/​apps/​object_detector/​handlers.py''​. ​ Note, you can bring up the handler code easily from [[wiki:​vizy_editor#​Text editor|Vizy'​s built-in text editor]] by clicking on the ☰ button in the text editor and selecting ''​handlers.py''​. ​ Note also, once you change ''​handlers.py''​ you can simply click reload/​refresh on your browser and Vizy will automatically restart the application and your code changes will take effect.
  
-FIXME+{{wiki:​image_1213.jpg}}
  
 === Event handler === === Event handler ===
Line 96: Line 96:
  In particular, the **event_type** value specifies the type of the event. ​ The different types are listed below:  In particular, the **event_type** value specifies the type of the event. ​ The different types are listed below:
  
-  * **trigger**:​ This event indicates that a trigger class object has been identified. ​ The **image** and **timestamp** are included. ​  The default implementation of ''​handle_event''​ sends a text message with the object class, timestamp and image. ​  +  * **trigger**:​ This event indicates that a trigger class object has been identified. ​ The **image** and **timestamp** are included. ​  The default implementation of ''​handle_event''​ sends a text message with the object class, ​**timestamp** and **image**.   
-  * **register**:​ This event indicates when a bird or non-bird ​has entered the scene. ​ The birds and non-birds ​are listed in the **dets** field. ​  +  * **register**:​ This event indicates when an object ​has entered the scene. ​ The objects ​are listed in the **dets** field. ​  
-  * **deregister**:​ This event indicates when a bird or non-bird ​has left the scene. ​ The birds and non-birds ​are listed in the **dets** field. ​+  * **deregister**:​ This event indicates when an object ​has left the scene. ​ The objects ​are listed in the **dets** field. ​
   * **daytime**:​ This event indicates when it has entered the "​daytime"​ state and has enough light to reliably identify species.   * **daytime**:​ This event indicates when it has entered the "​daytime"​ state and has enough light to reliably identify species.
   * **nighttime**: ​ This event indicates when it has entered the "​nighttime"​ state and is inactive.   * **nighttime**: ​ This event indicates when it has entered the "​nighttime"​ state and is inactive.
wiki/object_detector_app.txt · Last modified: 2023/05/09 16:27 by vizycam