Skip to content

Commit

Permalink
Fix thumbnail error (#191)
Browse files Browse the repository at this point in the history
* define stat globally

* update readme

---------

Co-authored-by: gferraro <g.ferraro22@gmail.com>
  • Loading branch information
gferraro and gferraro authored Dec 14, 2023
1 parent 155cabd commit 36902b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ This will install the executable `pi_classify` which can be used to connect to l


## Lila Dataset
- A public dataset is available here [Lila Dataset] (https://lila.science/datasets/new-zealand-wildlife-thermal-imaging/)
- A public dataset is available here [Lila Dataset](https://lila.science/datasets/new-zealand-wildlife-thermal-imaging/)
- This dataset can be trained on like so:

1. Download the data set [Lila Dataset Download] (https://storage.googleapis.com/public-datasets-lila/nz-thermal/new-zealand-wildlife-thermal-imaging.zip)
1. Download the data set [Lila Dataset Download](https://storage.googleapis.com/public-datasets-lila/nz-thermal/new-zealand-wildlife-thermal-imaging.zip)

2. Download the suggested split [Dataset split] (https://storage.googleapis.com/public-datasets-lila/nz-thermal/new-zealand-wildlife-thermal-imaging-splits.zip)
2. Download the suggested split [Dataset split](https://storage.googleapis.com/public-datasets-lila/nz-thermal/new-zealand-wildlife-thermal-imaging-splits.zip)

3. Unzip the contents of both files

Expand Down
4 changes: 3 additions & 1 deletion src/classify/thumbnail.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ def best_trackless_thumb(clip):
)


Stat = namedtuple("Stat", "region contours median_diff")


def get_track_thumb_stats(clip, track):
Stat = namedtuple("Stat", "region contours median_diff")
max_mass = 0
max_median_diff = 0
min_median_diff = 0
Expand Down

0 comments on commit 36902b4

Please sign in to comment.