Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add object filter ratio #2952

Conversation

mathmaniac43
Copy link
Contributor

Per issue #2948 (take two, this time targeting the correct branch release-0.11.0)

I was not able to figure out how to run frigate in a dev. container on a recorded video the way I wanted to for testing, but am open to doing so if I can get a bit of help/instruction.

I also did my best to maintain existing style/phrasing throughout, but feel free to make adjustments/requests if you think it should be improved.

Thanks!

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Mar 12, 2022

Since you added a field to the model you will also need to add a migration class to the migrations folder. Should be able to go off of what's there, let me know if you have any questions on that.

frigate/config.py Outdated Show resolved Hide resolved
frigate/video.py Outdated Show resolved Hide resolved
frigate/video.py Outdated Show resolved Hide resolved
@blakeblackshear
Copy link
Owner

Where are you getting stuck running in the dev container? You should be able to run python3 -m frigate in the terminal window.

I use this config for local dev:

cameras:
  back:
    ffmpeg:
      inputs:
        - path: /lab/frigate/airport.mp4
          input_args: -re -stream_loop -1 -fflags +genpts

@mathmaniac43
Copy link
Contributor Author

@blakeblackshear Python isn't my primary programming language and I haven't developed any packages before, so was not familiar with the -m flag, I bet that will get me moving, thanks.

@mathmaniac43
Copy link
Contributor Author

@blakeblackshear I got a No module named 'frigate.version' error, which looks like I can resolve using the Makefile. However, the dev. container does not have make in it, so I am going to have to do it outside the container. May be worth considering adding make to the container in the future.

@NickM-27
Copy link
Sponsor Collaborator

@mathmaniac43 I believe you are supposed to make outside and then start the container. That's what I've always done

- Accept `ratio` default
- Rename `bounds` to `box` for consistency
- Add migration for new field

Issue: blakeblackshear#2948
- 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: blakeblackshear#2948
@blakeblackshear
Copy link
Owner

Building outside the container is listed in the docs here: https://docs.frigate.video/contributing#core

The command is now just make instead of make amd64_frigate. Feel free to fix that in the docs in this PR too.

frigate/models.py Outdated Show resolved Hide resolved
frigate/models.py Outdated Show resolved Hide resolved
- Ensure that defaults match between Event and migration script
- Deconflict migration script number (from rebase)

Issue: blakeblackshear#2948
@mathmaniac43
Copy link
Contributor Author

@NickM-27 Makes sense, just fixed!

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Mar 19, 2022

Looks good to me 👍

@mathmaniac43
Copy link
Contributor Author

@blakeblackshear Pinging to make sure this has not fallen off your radar. Thanks.

@blakeblackshear
Copy link
Owner

Just busy with other things at the moment

@blakeblackshear blakeblackshear merged commit 045aac8 into blakeblackshear:release-0.11.0 Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants