Applies to v2.0.0-beta.2. This page covers the API changes that affect user-written code. If you only use the bundled plugins, you can skip it — but see Real-time Process for the
trigger_pinand threshold changes, which affect everyone.
Plugins for the YORU project are listed under Trigger Plugins.
A plugin written for Beta 1 or v1.1.1 will not run unchanged on Beta 2. Check all four points:
m_dictdef __init__(self, m_dict=None): # not: def __init__(self):
trigger() is a pyfirmata board, not a serial portarduino.writeDO_all(1) # not: ser.write(b"1")
arduino.writeDO_all(0) # not: ser.write(b"0")
Condition files may set Arduino_COM: "None", in which case no board is passed:
if arduino is None:
return
import yoru.libs.arduino as ard # not: import libs.arduino as ard
Libraries were reorganized into a
yoru/package in Beta 1, so the top-levellibsimport no longer resolves.
For the full signature, use a bundled plugin under trigger_plugins/ in the repository as the reference implementation — standard_arduino is the simplest one.
In Beta 1, three of the five bundled plugins — standard_nidaq, state_convert and state_convert_for_copulation_attempts — hit exactly these problems and could not be constructed at all, so the trigger silently never engaged. If your own plugin was written against the same pattern, it was likely affected too.
yoru.libs.yolo_wrapper was deleted in Beta 2. Replace:
from yoru.libs.yolo_wrapper import load_yolo_model
with:
from yoru.libs.plugins import get_detector
det = get_detector("auto", model_path) # or "ultralytics", "rtdetr", "torchvision", "onnx"
The detector exposes:
.names — the class-name table..detect(image) — takes a BGR image and returns a list of dicts with the keys x1, y1, x2, y2, conf, class_id, class_name.yoru.libs.file_operation_evaluation was also removed; it was a duplicate of yoru.libs.file_operation_create_label.
All backends now use the same thresholds: confidence 0.25, IoU 0.45. Previously each backend used its own default, so scripts built around torchvision models in particular will see a different number of detections than on Beta 1.
| Item | Beta 1 | Beta 2 |
|---|---|---|
| Trained weights | <project>/train/weights/best.pt |
<project>/exp_<model>/weights/best.pt |
| Saved window layouts | config/custom_layout_*.ini |
logs/custom_layout_*.ini |
| YOLOv5 sources | yoru/libs/yolov5/ |
Removed |
The stale config/custom_layout_*.ini files can be deleted; saved window layouts reset once.
The packaged source distribution now actually contains config/, trigger_plugins/ and web/, and yoru --version reports the real version instead of a placeholder.