From fc5d32749442a2e9d1ebca4c55b9cf8f023d04af Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 19 Dec 2019 09:37:10 +0100 Subject: [PATCH 1/9] Photo: DATETIME instead of TIMESTAMP for TakenAt #162 Error logging and labels were also improved along the way. Signed-off-by: Michael Mayer --- assets/config/labels.yml | 6 ++++ internal/entity/camera.go | 4 ++- internal/entity/country.go | 4 ++- internal/entity/event.go | 4 +-- internal/entity/keyword.go | 4 ++- internal/entity/label.go | 5 +++- internal/entity/lens.go | 4 ++- internal/entity/photo.go | 4 +-- internal/entity/photo_album.go | 4 ++- internal/entity/photo_keyword.go | 4 ++- internal/entity/photo_label.go | 4 ++- internal/photoprism/indexer_mediafile.go | 37 +++++++++++++++++++----- 12 files changed, 65 insertions(+), 19 deletions(-) diff --git a/assets/config/labels.yml b/assets/config/labels.yml index d9792f886..03595db4b 100644 --- a/assets/config/labels.yml +++ b/assets/config/labels.yml @@ -1902,6 +1902,7 @@ puffer: see: fish instrument: + threshold: 0.5 categories: - instrument - music @@ -3716,3 +3717,8 @@ slot: carousel: label: theme park + +groom: + label: wedding + categories: + - celebration diff --git a/internal/entity/camera.go b/internal/entity/camera.go index f1b27d85c..7c7fbfd9e 100644 --- a/internal/entity/camera.go +++ b/internal/entity/camera.go @@ -47,7 +47,9 @@ func NewCamera(modelName string, makeName string) *Camera { } func (m *Camera) FirstOrCreate(db *gorm.DB) *Camera { - db.FirstOrCreate(m, "camera_model = ? AND camera_make = ?", m.CameraModel, m.CameraMake) + if err := db.FirstOrCreate(m, "camera_model = ? AND camera_make = ?", m.CameraModel, m.CameraMake).Error; err != nil { + log.Errorf("camera: %s", err) + } return m } diff --git a/internal/entity/country.go b/internal/entity/country.go index b8438c787..4a45020f5 100644 --- a/internal/entity/country.go +++ b/internal/entity/country.go @@ -44,7 +44,9 @@ func NewCountry(countryCode string, countryName string) *Country { } func (m *Country) FirstOrCreate(db *gorm.DB) *Country { - db.FirstOrCreate(m, "id = ?", m.ID) + if err := db.FirstOrCreate(m, "id = ?", m.ID).Error; err != nil { + log.Errorf("country: %s", err) + } return m } diff --git a/internal/entity/event.go b/internal/entity/event.go index bec914bdf..2dda20db0 100644 --- a/internal/entity/event.go +++ b/internal/entity/event.go @@ -15,8 +15,8 @@ type Event struct { EventType string EventDescription string `gorm:"type:text;"` EventNotes string `gorm:"type:text;"` - EventBegin time.Time - EventEnd time.Time + EventBegin time.Time `gorm:"type:datetime;"` + EventEnd time.Time `gorm:"type:datetime;"` EventLat float64 EventLong float64 EventDist float64 diff --git a/internal/entity/keyword.go b/internal/entity/keyword.go index f666c7b84..127237f7b 100644 --- a/internal/entity/keyword.go +++ b/internal/entity/keyword.go @@ -24,7 +24,9 @@ func NewKeyword(keyword string) *Keyword { } func (m *Keyword) FirstOrCreate(db *gorm.DB) *Keyword { - db.FirstOrCreate(m, "keyword = ?", m.Keyword) + if err := db.FirstOrCreate(m, "keyword = ?", m.Keyword).Error; err != nil { + log.Errorf("keyword: %s", err) + } return m } diff --git a/internal/entity/label.go b/internal/entity/label.go index f6e469582..ff87d1324 100644 --- a/internal/entity/label.go +++ b/internal/entity/label.go @@ -24,6 +24,7 @@ type Label struct { func (m *Label) BeforeCreate(scope *gorm.Scope) error { if err := scope.SetColumn("LabelUUID", util.UUID()); err != nil { + log.Errorf("label: %s", err) return err } @@ -49,7 +50,9 @@ func NewLabel(labelName string, labelPriority int) *Label { } func (m *Label) FirstOrCreate(db *gorm.DB) *Label { - db.FirstOrCreate(m, "label_slug = ?", m.LabelSlug) + if err := db.FirstOrCreate(m, "label_slug = ?", m.LabelSlug).Error; err != nil { + log.Errorf("label: %s", err) + } return m } diff --git a/internal/entity/lens.go b/internal/entity/lens.go index 26bfd397c..1e6fcfabd 100644 --- a/internal/entity/lens.go +++ b/internal/entity/lens.go @@ -38,7 +38,9 @@ func NewLens(modelName string, makeName string) *Lens { } func (m *Lens) FirstOrCreate(db *gorm.DB) *Lens { - db.FirstOrCreate(m, "lens_model = ? AND lens_make = ?", m.LensModel, m.LensMake) + if err := db.FirstOrCreate(m, "lens_model = ? AND lens_make = ?", m.LensModel, m.LensMake).Error; err != nil { + log.Errorf("lens: %s", err) + } return m } diff --git a/internal/entity/photo.go b/internal/entity/photo.go index 87b1232b7..53a513e7b 100644 --- a/internal/entity/photo.go +++ b/internal/entity/photo.go @@ -43,8 +43,8 @@ type Photo struct { LocationID uint LocationChanged bool LocationEstimated bool - TakenAt time.Time `gorm:"index;"` - TakenAtLocal time.Time + TakenAt time.Time `gorm:"type:datetime;index;"` + TakenAtLocal time.Time `gorm:"type:datetime;"` TakenAtChanged bool TimeZone string Files []File diff --git a/internal/entity/photo_album.go b/internal/entity/photo_album.go index 2982b6b0c..26720e974 100644 --- a/internal/entity/photo_album.go +++ b/internal/entity/photo_album.go @@ -31,7 +31,9 @@ func NewPhotoAlbum(photoUUID, albumUUID string) *PhotoAlbum { } func (m *PhotoAlbum) FirstOrCreate(db *gorm.DB) *PhotoAlbum { - db.FirstOrCreate(m, "photo_uuid = ? AND album_uuid = ?", m.PhotoUUID, m.AlbumUUID) + if err := db.FirstOrCreate(m, "photo_uuid = ? AND album_uuid = ?", m.PhotoUUID, m.AlbumUUID).Error; err != nil { + log.Errorf("photo album: %s", err) + } return m } diff --git a/internal/entity/photo_keyword.go b/internal/entity/photo_keyword.go index 5c296890a..308d41e45 100644 --- a/internal/entity/photo_keyword.go +++ b/internal/entity/photo_keyword.go @@ -21,7 +21,9 @@ func NewPhotoKeyword(photoID, keywordID uint) *PhotoKeyword { } func (m *PhotoKeyword) FirstOrCreate(db *gorm.DB) *PhotoKeyword { - db.FirstOrCreate(m, "photo_id = ? AND keyword_id = ?", m.PhotoID, m.KeywordID) + if err := db.FirstOrCreate(m, "photo_id = ? AND keyword_id = ?", m.PhotoID, m.KeywordID).Error; err != nil { + log.Errorf("photo keyword: %s", err) + } return m } diff --git a/internal/entity/photo_label.go b/internal/entity/photo_label.go index 5b84084fc..9999ef95d 100644 --- a/internal/entity/photo_label.go +++ b/internal/entity/photo_label.go @@ -30,7 +30,9 @@ func NewPhotoLabel(photoId, labelId uint, uncertainty int, source string) *Photo } func (m *PhotoLabel) FirstOrCreate(db *gorm.DB) *PhotoLabel { - db.FirstOrCreate(m, "photo_id = ? AND label_id = ?", m.PhotoID, m.LabelID) + if err := db.FirstOrCreate(m, "photo_id = ? AND label_id = ?", m.PhotoID, m.LabelID).Error; err != nil { + log.Errorf("photo label: %s", err) + } return m } diff --git a/internal/photoprism/indexer_mediafile.go b/internal/photoprism/indexer_mediafile.go index 9e365e66f..e57cfc338 100644 --- a/internal/photoprism/indexer_mediafile.go +++ b/internal/photoprism/indexer_mediafile.go @@ -18,6 +18,7 @@ const ( indexResultUpdated IndexResult = "updated" indexResultAdded IndexResult = "added" indexResultSkipped IndexResult = "skipped" + indexResultFailed IndexResult = "failed" ) type IndexResult string @@ -163,7 +164,10 @@ func (i *Indexer) indexMediaFile(m *MediaFile, o IndexerOptions) IndexResult { i.estimateLocation(&photo) } - i.db.Unscoped().Save(&photo) + if err := i.db.Unscoped().Save(&photo).Error; err != nil { + log.Errorf("index: %s", err) + return indexResultFailed + } } else { event.Publish("count.photos", event.Data{ "count": 1, @@ -171,7 +175,10 @@ func (i *Indexer) indexMediaFile(m *MediaFile, o IndexerOptions) IndexResult { photo.PhotoFavorite = false - i.db.Create(&photo) + if err := i.db.Create(&photo).Error; err != nil { + log.Errorf("index: %s", err) + return indexResultFailed + } } if len(labels) > 0 { @@ -217,13 +224,22 @@ func (i *Indexer) indexMediaFile(m *MediaFile, o IndexerOptions) IndexResult { if fileQuery.Error == nil { file.UpdatedIn = int64(time.Since(start)) - i.db.Unscoped().Save(&file) + + if err := i.db.Unscoped().Save(&file).Error; err != nil { + log.Errorf("index: %s", err) + return indexResultFailed + } + return indexResultUpdated } file.CreatedIn = int64(time.Since(start)) - i.db.Create(&file) + if err := i.db.Create(&file).Error; err != nil { + log.Errorf("index: %s", err) + return indexResultFailed + } + return indexResultAdded } @@ -322,7 +338,10 @@ func (i *Indexer) addLabels(photoId uint, labels Labels) { if lm.LabelPriority != label.Priority { lm.LabelPriority = label.Priority - i.db.Save(&lm) + + if err := i.db.Save(&lm).Error; err != nil { + log.Errorf("index: %s", err) + } } plm := entity.NewPhotoLabel(photoId, lm.ID, label.Uncertainty, label.Source).FirstOrCreate(i.db) @@ -330,13 +349,17 @@ func (i *Indexer) addLabels(photoId uint, labels Labels) { // Add categories for _, category := range label.Categories { sn := entity.NewLabel(category, -3).FirstOrCreate(i.db) - i.db.Model(&lm).Association("LabelCategories").Append(sn) + if err := i.db.Model(&lm).Association("LabelCategories").Append(sn).Error; err != nil { + log.Errorf("index: %s", err) + } } if plm.LabelUncertainty > label.Uncertainty { plm.LabelUncertainty = label.Uncertainty plm.LabelSource = label.Source - i.db.Save(&plm) + if err := i.db.Save(&plm).Error; err != nil { + log.Errorf("index: %s", err) + } } } } From cf28656547917e58bdac166d058e1b94dac8a46d Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 19 Dec 2019 10:02:00 +0100 Subject: [PATCH 2/9] Labels: Update categories Signed-off-by: Michael Mayer --- assets/config/labels.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/assets/config/labels.yml b/assets/config/labels.yml index 03595db4b..d6eea6565 100644 --- a/assets/config/labels.yml +++ b/assets/config/labels.yml @@ -1904,7 +1904,6 @@ puffer: instrument: threshold: 0.5 categories: - - instrument - music - entertainment @@ -3708,6 +3707,8 @@ volcano: radio telescope: threshold: 0.5 + categories: + - science thimble: priority: -1 @@ -3717,8 +3718,10 @@ slot: carousel: label: theme park + categories: + - entertainment groom: label: wedding categories: - - celebration + - event From 1ae24b4c5540fafeab8827610e767b241349ed69 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 19 Dec 2019 10:10:52 +0100 Subject: [PATCH 3/9] Docker: Update MariaDB to 10.4.11 Signed-off-by: Michael Mayer --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 617e2fb22..40444f431 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,7 +37,7 @@ services: TF_CPP_MIN_LOG_LEVEL: 0 photoprism-db: - image: mariadb:10.4.8 + image: mariadb:10.4.11 command: mysqld --port=4001 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=1024 expose: - "4001" From 628f4a24ab7d4216225a692dc3221ac2c15a456a Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 19 Dec 2019 10:20:09 +0100 Subject: [PATCH 4/9] Docker: Update MariaDB to 10.4.11 on TravisCI Signed-off-by: Michael Mayer --- docker-compose.travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.travis.yml b/docker-compose.travis.yml index 93046064a..f30a3a219 100644 --- a/docker-compose.travis.yml +++ b/docker-compose.travis.yml @@ -41,7 +41,7 @@ services: CI_JOB_ID: photoprism-db: - image: mariadb:10.4.8 + image: mariadb:10.4.11 command: mysqld --port=4001 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=1024 expose: - "4001" From 49f22c0d9674c4b09500ce523be7e7a0f6cfc125 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 19 Dec 2019 11:08:07 +0100 Subject: [PATCH 5/9] Labels: Update labels.yml Signed-off-by: Michael Mayer --- assets/config/labels.yml | 41 +++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/assets/config/labels.yml b/assets/config/labels.yml index d6eea6565..4048accea 100644 --- a/assets/config/labels.yml +++ b/assets/config/labels.yml @@ -229,8 +229,6 @@ windsor tie: chainlink fence: label: outdoor priority: -1 - categories: - - fence mitten: label: unknown @@ -305,7 +303,7 @@ ostrich: bird: label: bird - threshold: 0.25 + threshold: 0.3 categories: - animal @@ -2278,11 +2276,7 @@ dome: - building drilling platform: - label: industrial - categories: - - building - - water - - sea + label: building drum: see: instrument @@ -2615,10 +2609,9 @@ mountain bike: - sports mountain tent: - label: tent + label: camping categories: - - camping - - travel + - outdoor moving van: label: van @@ -2735,8 +2728,6 @@ photocopier: picket fence: label: outdoor priority: -1 - categories: - - fence pickup: categories: @@ -2925,11 +2916,12 @@ ski: - winter - snow - sports + - outdoor sleeping bag: categories: - - travel - camping + - outdoor sliding door: label: door @@ -3158,8 +3150,6 @@ wooden spoon: worm fence: label: outdoor priority: -1 - categories: - - fence wreck: see: ship @@ -3173,7 +3163,9 @@ yawl: - vehicle yurt: - label: tent + label: camping + categories: + - outdoor comic book: label: colorful @@ -3544,7 +3536,9 @@ ear: priority: -1 sunglasses: + label: sunny day priority: 2 + threshold: 0.2 sunglass: see: sunglasses @@ -3554,10 +3548,9 @@ packet: priority: -1 swing: - label: cosy + label: moment categories: - outdoor - - furniture web site: label: info @@ -3725,3 +3718,13 @@ groom: label: wedding categories: - event + +maypole: + label: festival + categories: + - event + +puck: + label: sports + threshold: 0.5 + priority: -1 From 2d3937f3ebbc1ea11ebddddb6417c596b302f7c0 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 19 Dec 2019 11:39:40 +0100 Subject: [PATCH 6/9] Labels: Update labels.yml Signed-off-by: Michael Mayer --- assets/config/labels.yml | 97 ++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 63 deletions(-) diff --git a/assets/config/labels.yml b/assets/config/labels.yml index 4048accea..863f03d18 100644 --- a/assets/config/labels.yml +++ b/assets/config/labels.yml @@ -437,6 +437,7 @@ african chameleon: categories: - reptile - animal + - lizard american chameleon: see: african chameleon @@ -471,9 +472,7 @@ green lizard: see: lizard komodo dragon: - categories: - - reptile - - animal + see: lizard african crocodile: label: crocodile @@ -571,46 +570,32 @@ scorpion: - spider - insect -black and gold garden spider: +spider: + label: spider categories: - animal - - spider - - insect + +black and gold garden spider: + see: spider barn spider: - categories: - - animal - - spider - - insect + see: spider garden spider: - categories: - - animal - - spider - - insect + see: spider black widow: - categories: - - animal - - spider - - insect + see: spider tarantula: - categories: - - animal - - spider - - insect + see: spider wolf spider: - categories: - - animal - - spider - - insect + see: spider centipede: categories: - animal - - insect black grouse: threshold: 0.3 @@ -647,10 +632,10 @@ peacock: - bird quail: + label: bird threshold: 0.3 categories: - animal - - bird partridge: threshold: 0.3 @@ -846,7 +831,6 @@ hermit crab: isopod: categories: - animal - - insect white stork: label: storck @@ -1395,63 +1379,43 @@ meerkat: categories: - animal -tiger beetle: +beetle: categories: - animal - - beetle - - insect + +tiger beetle: + see: beetle ladybug: - categories: - - animal - - beetle - - insect + see: beetle ground beetle: - categories: - - animal - - beetle - - insect + see: beetle long-horned beetle: - categories: - - animal - - beetle - - insect + see: beetle leaf beetle: - categories: - - animal - - beetle - - insect + see: beetle dung beetle: categories: - animal - beetle - - insect rhinoceros beetle: - categories: - - animal - - beetle - - insect + see: beetle weevil: - categories: - - animal - - beetle - - insect + see: beetle fly: categories: - animal - - insect bee: categories: - animal - - insect apiary: priority: -1 @@ -1536,6 +1500,7 @@ lycaenid: - butterfly starfish: + threshold: 0.5 categories: - water - sea @@ -2695,11 +2660,10 @@ car: - vehicle racer: - label: race car + label: vehicle threshold: 0.2 categories: - car - - vehicle - street passenger car: @@ -3529,8 +3493,11 @@ spider web: priority: -2 wool: + label: furry animal threshold: 0.5 priority: -1 + categories: + - animal ear: priority: -1 @@ -3587,9 +3554,9 @@ crutch: threshold: 0.3 mousetrap: - label: object + label: unknown priority: -1 - threshold: 0.3 + threshold: 0.5 band aid: label: portrait @@ -3728,3 +3695,7 @@ puck: label: sports threshold: 0.5 priority: -1 + +mosquito net: + label: outdoor + priority: -1 From fbaf1d062e60482b9aa2ac946bc45a082105cd39 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 19 Dec 2019 11:41:17 +0100 Subject: [PATCH 7/9] Labels: Update labels.yml Signed-off-by: Michael Mayer --- assets/config/labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/config/labels.yml b/assets/config/labels.yml index 863f03d18..01ff62215 100644 --- a/assets/config/labels.yml +++ b/assets/config/labels.yml @@ -3493,7 +3493,7 @@ spider web: priority: -2 wool: - label: furry animal + label: fur threshold: 0.5 priority: -1 categories: From cd90e24de58805672b65b6f4ccbacf40d606871e Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 19 Dec 2019 12:11:21 +0100 Subject: [PATCH 8/9] Labels: Update labels.yml Signed-off-by: Michael Mayer --- assets/config/labels.yml | 214 ++++++++++++++------------------------- 1 file changed, 77 insertions(+), 137 deletions(-) diff --git a/assets/config/labels.yml b/assets/config/labels.yml index 01ff62215..a3e449f65 100644 --- a/assets/config/labels.yml +++ b/assets/config/labels.yml @@ -4,7 +4,6 @@ cat: categories: - animal - kitty - - mammal tabby cat: see: cat @@ -23,10 +22,8 @@ tiger cat: categories: - cat - tiger - - stripes - animal - kitty - - mammal wild cat: priority: 5 @@ -34,7 +31,6 @@ wild cat: categories: - cat - animal - - mammal - wildlife lynx: @@ -200,6 +196,7 @@ ship: solar dish: threshold: 0.5 + priority: -1 grasshopper: label: grasshopper @@ -385,23 +382,19 @@ axolotl: - amphibians - animal -bullfrog: +frog: + label: frog categories: - - amphibians - animal - - frog + +bullfrog: + see: frog tree frog: - categories: - - amphibians - - animal - - frog + see: frog tailed frog: - categories: - - amphibians - - animal - - frog + see: frog turtle: label: turtle @@ -476,6 +469,7 @@ komodo dragon: african crocodile: label: crocodile + threshold: 0.25 categories: - reptile - animal @@ -689,11 +683,11 @@ toucan: - bird drake: + label: duck threshold: 0.3 categories: - animal - bird - - duck red-breasted merganser: label: duck @@ -719,7 +713,7 @@ echidna: - animal platypus: - threshold: 0.2 + threshold: 0.3 categories: - animal @@ -787,46 +781,44 @@ chambered nautilus: - animal - slug -dungeness crab: +crab: + label: crab categories: - animal - - crab + +dungeness crab: + see: crab rock crab: - categories: - - animal - - crab + see: crab fiddler crab: - categories: - - animal - - crab + see: crab king crab: + see: crab + +hermit crab: + see: crab + +lobster: + label: lobster categories: - animal - - crab + - food + - water american lobster: - categories: - - animal - - crab + see: lobster spiny lobster: - categories: - - animal - - crab + see: lobster crayfish: categories: - water - animal - - crab - -hermit crab: - categories: - - animal - - crab + - lobster isopod: categories: @@ -890,14 +882,10 @@ redshank: - nature dowitcher: - categories: - - animal - - bird + see: bird oystercatcher: - categories: - - animal - - bird + see: bird pelican: categories: @@ -915,17 +903,17 @@ albatross: - animal - bird -grey whale: +whale: + label: whale categories: - animal - - whale - - mammal + - water + +grey whale: + see: whale killer whale: - categories: - - animal - - whale - - mammal + see: whale dugong: categories: @@ -941,7 +929,6 @@ dog: categories: - animal - puppy - - mammal chihuahua dog: see: dog @@ -1331,45 +1318,41 @@ African hunting dog: hyena: see: dog -red fox: +fox: + label: fox + threshold: 0.25 categories: - - fox - animal +red fox: + see: fox + kit fox: - categories: - - fox - - animal + see: fox -Arctic fox: - categories: - - fox - - animal +arctic fox: + see: fox -rgrey fox: +grey fox: + see: fox + +bear: + label: bear + threshold: 0.25 categories: - - fox - animal brown bear: - categories: - - animal - - bear + see: bear -American black bear: - categories: - - animal - - bear +american black bear: + see: bear ice bear: - categories: - - animal - - bear + see: bear sloth bear: - categories: - - animal - - bear + see: bear mongoose: categories: @@ -1380,6 +1363,7 @@ meerkat: - animal beetle: + label: beetle categories: - animal @@ -1463,41 +1447,28 @@ damselfly: - animal - insect -admiral: +butterfly: + label: butterfly categories: - animal - - insect - - butterfly + +admiral: + see: butterfly ringlet: - categories: - - animal - - insect - - butterfly + see: butterfly monarch: - categories: - - animal - - insect - - butterfly + see: butterfly cabbage butterfly: - categories: - - animal - - insect - - butterfly + see: butterfly sulphur butterfly: - categories: - - animal - - insect - - butterfly + see: butterfly lycaenid: - categories: - - animal - - insect - - butterfly + see: butterfly starfish: threshold: 0.5 @@ -1573,7 +1544,6 @@ sorrel: zebra: categories: - animal - - mammal - wildlife hog: @@ -1581,19 +1551,16 @@ hog: categories: - animal - pig - - mammal wild boar: threshold: 0.66 categories: - animal - - mammal warthog: threshold: 0.66 categories: - animal - - mammal - wildlife hippopotamus: @@ -1607,19 +1574,16 @@ ox: threshold: 0.2 categories: - animal - - mammal - farm water buffalo: categories: - animal - - mammal - farm bison: categories: - animal - - mammal ram: label: sheep @@ -1627,43 +1591,36 @@ ram: categories: - farm - animal - - mammal bighorn: categories: - animal - - mammal ibex: categories: - animal - - mammal hartebeest: threshold: 0.4 categories: - animal - - mammal impala: threshold: 0.4 categories: - animal - - mammal - wildlife gazelle: threshold: 0.4 categories: - animal - - mammal - wildlife llama: threshold: 0.4 categories: - animal - - mammal weasel: threshold: 0.4 @@ -1688,7 +1645,6 @@ otter: threshold: 0.4 categories: - animal - - mammal skunk: threshold: 0.4 @@ -1699,7 +1655,6 @@ badger: threshold: 0.4 categories: - animal - - mammal armadillo: categories: @@ -1714,7 +1669,6 @@ ape: priority: 2 categories: - animal - - mammal orangutan: see: ape @@ -1733,7 +1687,6 @@ monkey: priority: 2 categories: - animal - - mammal siamang: see: monkey @@ -1791,12 +1744,11 @@ fossa: see: cat indian elephant: + label: elephant priority: 2 threshold: 0.47 categories: - animal - - elephant - - mammal - wildlife african elephant: @@ -1805,7 +1757,6 @@ african elephant: categories: - animal - elephant - - mammal - wildlife tusker: @@ -1814,14 +1765,12 @@ tusker: threshold: 0.3 categories: - animal - - mammal panda: label: panda priority: 2 categories: - animal - - mammal lesser panda: see: panda @@ -2066,6 +2015,8 @@ canoe: can opener: label: kitchen + categories: + - cooking car mirror: label: car @@ -2182,10 +2133,9 @@ crash helmet: - construction side crock pot: + label: cooking categories: - kitchen - - pot - - cooking dam: categories: @@ -2817,9 +2767,10 @@ rocking chair: - furniture rotisserie: + threshold: 0.5 categories: - - kitchen - cooking + - restaurant rubber eraser: categories: @@ -2831,9 +2782,7 @@ running shoe: saltshaker: categories: - - kitchen - cooking - - food sandal: categories: @@ -2925,7 +2874,6 @@ space heater: spatula: categories: - kitchen - - cooking speedboat: categories: @@ -2957,12 +2905,10 @@ steel drum: stove: categories: - kitchen - - cooking strainer: categories: - kitchen - - cooking streetcar: categories: @@ -3010,7 +2956,6 @@ theater curtain: toaster: categories: - kitchen - - cooking toilet seat: label: toilet @@ -3069,7 +3014,6 @@ violin: waffle iron: categories: - kitchen - - cooking wall clock: label: clock @@ -3104,12 +3048,10 @@ wine bottle: wok: categories: - kitchen - - cooking wooden spoon: categories: - kitchen - - cooking worm fence: label: outdoor @@ -3415,9 +3357,7 @@ stinkhorn: - mushroom earthstar: - categories: - - fungus - - mushroom + label: nature hen-of-the-woods: categories: From 25554604049fbfd0a8349463c64f549803661436 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 19 Dec 2019 12:25:54 +0100 Subject: [PATCH 9/9] Labels: Update labels.yml Signed-off-by: Michael Mayer --- assets/config/labels.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/assets/config/labels.yml b/assets/config/labels.yml index a3e449f65..09642f3f1 100644 --- a/assets/config/labels.yml +++ b/assets/config/labels.yml @@ -3,7 +3,6 @@ cat: priority: 5 categories: - animal - - kitty tabby cat: see: cat @@ -23,7 +22,6 @@ tiger cat: - cat - tiger - animal - - kitty wild cat: priority: 5 @@ -1320,7 +1318,7 @@ hyena: fox: label: fox - threshold: 0.25 + threshold: 0.3 categories: - animal @@ -1338,7 +1336,7 @@ grey fox: bear: label: bear - threshold: 0.25 + threshold: 0.3 categories: - animal @@ -1394,40 +1392,50 @@ weevil: see: beetle fly: + threshold: 0.3 categories: - animal bee: + threshold: 0.3 categories: - animal apiary: + label: beehive + threshold: 0.3 priority: -1 ant: + threshold: 0.3 categories: - animal - insect walking stick: + threshold: 0.3 priority: -1 cockroach: + threshold: 0.3 categories: - animal - insect mantis: + threshold: 0.3 categories: - animal - insect cicada: + threshold: 0.3 categories: - animal - insect leafhopper: + threshold: 0.3 categories: - animal - insect @@ -2215,7 +2223,7 @@ electric locomotive: - vehicle entertainment center: - label: television + label: screen espresso maker: categories: @@ -2354,7 +2362,7 @@ hatchet: - tool home theater: - label: television + label: screen honeycomb: priority: -1 @@ -2505,7 +2513,6 @@ monitor: label: screen categories: - display - - monitor - computer mosque: @@ -3553,7 +3560,7 @@ patio: label: building scoreboard: - label: urban scenery + label: scenery racket: label: outdoor