Applies to v2.0.0-beta.2. For the stable v1.1.1 procedure, see the User Guides.
⚠️ Read this before your next closed-loop experiment. Two settings that Beta 1 silently ignored are now honoured:
trigger_pinandtrigger_threshold_configuration. An unchanged condition file will not behave the way it did on Beta 1.
trigger_pinBeta 1 hard-coded the TTL output to digital pin 13 and ignored whatever trigger_pin said in your file. Beta 2 uses the value in the file.
trigger_pin to something other than 13, that pin is what will now fire. Edit the YAML or rewire before your next experiment.trigger_pin key still default to 13.trigger_threshold_configurationBeta 1 loaded this value but never read it, so the trigger fired on any detection of the trigger class regardless of confidence — effectively a threshold of 0.
Edit a condition YAML file.
All shipped condition files under
config/were rewritten in Beta 2: developer-machine paths and the deadroot:key were removed,exportdefaults to./results/, a model path pointing at a non-existent file was fixed,Arduino_COM: 13(a pin number in the COM field) was fixed, curly quotes around“COM3”were fixed, atrigger_stylenaming a plugin that does not exist was fixed, and every key was given an inline comment.
Your existing condition files still load — the new keys are optional and unknown keys are ignored.
name: fly_copulation_project # Experimental name.
export: ./results/ # Output folder for videos and experiment information.
export_name: fly_copulation_real_time_analysis # Specifying the file name of the output video.
model:
yolo_detection: False # If you want to start YORU's inference immediately after starting YORU's real-time process, set this to True.
yolo_model_path: Path/to/YORU/model # Specify the YORU model (.pt or .onnx file).
yolo_model_type: auto # Optional. auto / ultralytics / rtdetr / torchvision / onnx. Auto-detected from the weights file if omitted.
Trigger: False
capture_style:
stream_MSS: False # When using the screen capture function, set to True.
trigger:
trigger_threshold_configuration: 0.3 # Confidence threshold when detecting YORU. APPLIED in Beta 2 (ignored in Beta 1).
trigger_class: copulation # Which action class to trigger.
Arduino_COM: "COM3" # COM to which Arduino is connected. Use "None" when no board is connected. Straight quotes only.
trigger_pin: 13 # Pin number for outputting TTL signals with Arduino. HONOURED in Beta 2 (always 13 in Beta 1).
trigger_style: standard_arduino # Select which trigger plugin to use.
hardware:
use_camera: True # Specify whether to use the camera.
camera_id: 0 # Specifying the camera ID.
camera_width: 640 # Specify the width (px) of images captured by the camera.
camera_height: 480 # Specify the height (px) of images captured by the camera.
camera_scale: 1 # If you want to change the scale of the camera image, change this setting.
camera_fps: 30 # Specifying camera fps.
camera_imshow: False # When set to True, the opencv window opens.
camera_settings_dialog: False # New in Beta 2. Opt-in camera driver property dialog.
A configuration creation tool built with DearPyGui is available for setting condition files up interactively.
Write the “Standard Firmata” program, located within the Example programs section of the Arduino IDE, to the Arduino.
Connect a camera and Arduino to the PC.
Select the condition YAML file on the YORU start page.
The launcher shows the selected condition file in the window at startup, and remembers the last-used config instead of resetting to
config/template.yaml.
Run “Real-time Process”.
It can also be started directly from the command line:
python -m yoru.realtime_yoru_GUI path/to/condition.yaml
Operate the Real-time Process GUI.
i. Check the “YORU detection” box to start YORU’s real-time analysis. Frames analyzed by YORU will be displayed on the right.
ii. Check the “Trigger condition” box to start the YORU trigger. A TTL signal is then output on the Arduino pin given by trigger_pin when the trigger class is detected above trigger_threshold_configuration.
iii. Save videos by checking “Streaming data”.
| Key | Change |
|---|---|
trigger.trigger_pin |
Now honoured (Beta 1 always used pin 13) |
trigger.trigger_threshold_configuration |
Now applied (Beta 1 ignored it) |
trigger.Arduino_COM |
"None" is supported for running with no board connected. Use straight quotes |
model.yolo_model_path |
Accepts .onnx as well as .pt. YOLOv5 .pt files no longer load |
model.yolo_model_type |
yolov5 is aliased to ultralytics; onnx selects the ONNX backend |
hardware.camera_settings_dialog |
New, optional, default False. The camera driver’s property dialog is now opt-in |
export |
Defaults to ./results/ in the shipped files |
root: |
Removed from the shipped files (was unused) |
standard_nidaq, state_convert and state_convert_for_copulation_attempts could not even be constructed, so the trigger never engaged. The two state_convert plugins also still wrote to a serial port that had become a pyfirmata board. All are fixed.nidaq.dio.stop() now actually stops the DAQ task, and a full-width character that made ser_recount unconstructible was fixed.stream_MSS: True) works. Beta 1 fed 4-channel BGRA frames to the detector, the recorder and the display, producing broken output.hardware.camera_id.hardware.camera_settings_dialog.