Fix logical errors

- field migrations require default values
- `clipped` referenced the wrong index for region, since it shifted
- missed an inclusion of `ratio` for detections in `process_frames`
- revert naming `o[2]` as `box` since it is out of scope!

This has now been test-run against a video, so I believe the kinks are
worked out.

Issue: #2948
This commit is contained in:
Nick
2022-03-12 09:37:17 -05:00
parent 3bb3aecf97
commit 2ad0ed9b8d
3 changed files with 10 additions and 7 deletions
+3 -1
View File
@@ -30,7 +30,9 @@ SQL = pw.SQL
def migrate(migrator, database, fake=False, **kwargs):
migrator.add_fields(
Event,
ratio=pw.FloatField(),
ratio=pw.FloatField(
default=1.0
), # There is no way to get the true ratio from an existing recording, so simply assume they are square.
)