this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

visual: tweak Hive thesholds for furry content specifically (#636)

Experimental improvement to auto-labeling, specifically for furry art
(aka, cartoon content). Should reduce false-positive sexual and porn
labels on this category of content (though still some false-positives).

authored by

bnewbold and committed by
GitHub
c9117c4a b0cfa26f

+15 -7
+15 -7
automod/visual/hiveai_client.go
··· 89 89 scores[cls.Class] = cls.Score 90 90 } 91 91 92 + threshold := 0.90 93 + 94 + // if this is furry art content, then require very high confidence when flagging for any sexual reason 95 + // note that this is a custom model, not always returned in generic Hive responses 96 + if furryScore, ok := scores["furry-yes_furry"]; ok && furryScore > 0.95 { 97 + threshold = 0.99 98 + } 99 + 92 100 // first check if porn... 93 101 for _, pornClass := range []string{"yes_sexual_activity", "animal_genitalia_and_human", "yes_realistic_nsfw"} { 94 - if scores[pornClass] >= 0.9 { 102 + if scores[pornClass] >= threshold { 95 103 return "porn" 96 104 } 97 105 } 98 - if scores["general_nsfw"] >= 0.9 { 106 + if scores["general_nsfw"] >= threshold { 99 107 // special case for some anime examples 100 108 if scores["animated_animal_genitalia"] >= 0.5 { 101 109 return "porn" 102 110 } 103 111 104 112 // special case for some pornographic/explicit classic drawings 105 - if scores["yes_undressed"] >= 0.9 && scores["yes_sexual_activity"] >= 0.9 { 113 + if scores["yes_undressed"] >= threshold && scores["yes_sexual_activity"] >= threshold { 106 114 return "porn" 107 115 } 108 116 } 109 117 110 118 // then check for sexual suggestive (which may include nudity)... 111 119 for _, sexualClass := range []string{"yes_sexual_intent", "yes_sex_toy"} { 112 - if scores[sexualClass] >= 0.9 { 120 + if scores[sexualClass] >= threshold { 113 121 return "sexual" 114 122 } 115 123 } 116 - if scores["yes_undressed"] >= 0.9 { 124 + if scores["yes_undressed"] >= threshold { 117 125 // special case for bondage examples 118 126 if scores["yes_sex_toy"] > 0.75 { 119 127 return "sexual" ··· 122 130 123 131 // then non-sexual nudity... 124 132 for _, nudityClass := range []string{"yes_male_nudity", "yes_female_nudity", "yes_undressed"} { 125 - if scores[nudityClass] >= 0.9 { 133 + if scores[nudityClass] >= threshold { 126 134 return "nudity" 127 135 } 128 136 } ··· 130 138 // then finally flag remaining "underwear" images in to sexually suggestive 131 139 // (after non-sexual content already labeled above) 132 140 for _, underwearClass := range []string{"yes_male_underwear", "yes_female_underwear"} { 133 - if scores[underwearClass] >= 0.9 { 141 + if scores[underwearClass] >= threshold { 134 142 return "sexual" 135 143 } 136 144 }