[Idea] - AI Image Tagging - Is this something we can use for TeaseAI etc?

Webteases are great, but what if you're in the mood for a slightly more immersive experience? Chat about Tease AI and other offline tease software.

Moderator: 1885

Post Reply
User avatar
Helequin
Experimentor
Experimentor
Posts: 1062
Joined: Sat Sep 09, 2006 11:59 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Location: Canada

[Idea] - AI Image Tagging - Is this something we can use for TeaseAI etc?

Post by Helequin »

TL:DR Version: AI powered image tagging is seeing a lot of popular development to complement AI image generation (e.g. for Stable Diffusion). Example tagging models (sometimes called interrogators) are CLIP, BLIP and WD1.4. Can we use this to create a competent method for tagging images for TeaseAI and similar projects?

Some examples of WD1.4 tagging in the 3rd post below.


Full post

Wanted to toss an idea at the talented creators around here who know their way around coding far better than me:

One of the most tedious parts of setting up programs like TeaseAI (any version) is tagging the images we want to use. Tags are great, since they tell the AI what those images contain and use that for more interesting or immersive content and dialogue. They're just awful to sit down and add manually.

In the past there was an attempt to use NudeNet to at least do some basic tagging for TeaseAI. It was only ever for nudity, and AFAIK was never developed into an easy to use program.

TeaseAI and equivalents are a niche inside the niche of Tease and Denial. There's always more for creators to do with TeaseAI itself and supporting apps like an AI image tagger aren't all that urgent. But this made me start to think - what if we could tap into a much larger niche where development of AI tagging is active and ongoing?

Efficient AI image tagging is something that is very actively being developed for use with AI Image Generation (e.g. Stable Diffusion). There are a couple of models for tagging out there for tagging already. CLIP and BLIP describe the image with a full sentence type description. DeepDanbooru creates a list of tags with an anime focused. WD1.4 (waifu diffusion) looks like it could be really promising for tagging images for other uses like ours. While intended for anime, I've gotten surprisingly great results on photos.

WD1.4 spits out a list of comma delimited tags. It's not just about nudity, it will include who's in the scene, what's happening, detail clothing, pretty much every tag you might need for an AI to try and create the same image from the text. It's way more detail than TeaseAI has ever asked for. With all the interest in Stable Diffusion there are already apps to generate WD1.4 tags, edit and view them in reasonably easy to use form.

Of course the tags are not 100% accurate, but I've noticed where is screws up it tends to be things like hair colour or breast size. It's more rare WD1.4 won't recognize bare breasts and so on. For me, I'd rather have my whole library of photos with the odd mistag available than only the sets I've slowly tagged by hand.

If you're curious you can give the tagger a test run here to see the sort of output it will produce. It's pretty impressive even for hardcore and group shots. (Use SwinV2): https://huggingface.co/spaces/SmilingWolf/wd-v1-4-tags

I believe (not 100% sure) that this is a list of the possible danbooru tags: https://danbooru.donmai.us/wiki_pages/tag_groups

Unfortunately, my own interest and skill in coding is not that high. But I'm curious if anyone here would know how possible it might be to take the output of something like WD1.4 and use it for TeaseAI? I feel like if we can harness this it would mean the AI part is taken care of and we just need to translate to our needs.

Obviously the many varied outputs WD1.4 can spit out would need to be translated to TAI terms. The file structure is different as well. TAI tags use one text file in the folder while WD1.4 produces one tag text file for every image.

Curious to hear any thoughts!
Last edited by Helequin on Thu Feb 16, 2023 12:05 am, edited 1 time in total.
Playing Help Me Cum Please!
Choosing a Goddess - a set for anyone to play
The 1000th Reply Celebration Challenge and it's Finale - an ongoing challenge to try
Co-author of Kyla's Party - webtease based on Help me Cum Please.


Miss Elyna's Cum Challenge Winner
User avatar
markus
Explorer At Heart
Explorer At Heart
Posts: 663
Joined: Tue Nov 18, 2008 11:09 pm

Re: [Idea] - AI Image Tagging - Is this something we can use for TeaseAI etc?

Post by markus »

Helequin wrote: Wed Feb 15, 2023 4:00 am
Efficient AI image tagging is something that is very actively being developed for use with AI Image Generation (e.g. Stable Diffusion). There are a couple of models for tagging out there with CLIP and BLIP giving a sentence type of description and DeepDanbooru being anime focused. WD1.4 (waifu diffusion) looks like it could be really promising for tagging images along our needs though. While it is intended for anime, I've gotten surprisingly great results on photos.

WD1.4 spits out a list of comma delimited tags. It's not limited to just nudity showing either, it will include who's in the scene, what's happening, detail clothing, pretty much every tag you might need for an AI to try and create the same image from the text. It's way more detail than TeaseAI has ever asked for. With all the interest in StableDiffusion there are already apps to generate WD1.4 tags, edit and view them in reasonably easy to use form.

Of course the tags are not 100% accurate, but I've noticed where is screws up it tends to be things like hair colour, breast size. It's more rare that it won't recognize bare breasts and so on. And in general, I'd rather have my whole library of photos with the odd mistag available than only the sets I've slowly tagged by hand.

If you're curious you can give the tagger a test run here to see the sort of output it will produce. It's pretty impressive even for hardcore and group shots. (Use SwinV2): https://huggingface.co/spaces/SmilingWolf/wd-v1-4-tags

I believe (not 100% sure) that this is a list of the possible danbooru tags: https://danbooru.donmai.us/wiki_pages/tag_groups
Hi! :wave:

You are throwing a lot of technical terms here at us, ... to be honest, I have never heard of any of them (except NudeNet), yepp, I could start to look them up and inform myself about all that stuff, ... but I am simply too busy for looking these things up in detail.
But of course, one can figure out what's this all about without knowing what i.e. CLIP, BLIP or WD1.4 actually is.

Personally (but that's really just me!!!) I guess I would prefer to still tag my pictures manually, especially because I use only sort of favorite pictures to tag them, ... see, ... if a script uses i.e. @TagBodyFace then I wanna get shown a really pretty face, not just a face, ... same goes for other tags, ... @TagBodyAss should show me an really amazing ass, not just an ass.

But again, that's just me.
I think that for a lot of users, especially when they start and are new to get into TAI, some sort of automated tagging would be really helpful.

But I'm curious if anyone here would know how possible it might be to take the output of something like WD1.4 and use it for TeaseAI? I feel like if we can harness this it would mean the AI part is taken care of and we just need to translate to our needs.

Obviously the many varied outputs WD1.4 can spit out would need to be translated to TAI terms. The file structure is different as well. TAI tags use one text file in the folder while WD1.4 produces one tag text file for every image.
Can you please post some examples of those outputs?
Without those examples I can only guess, ... but basically it shouldn't be much of a problem to 'translate' them to TAI - tags.
Curious to hear any thoughts!
Me too, ... I hope some other users give some thougths and feedback on this! :yes:

Best greetings,
Markus
User avatar
Helequin
Experimentor
Experimentor
Posts: 1062
Joined: Sat Sep 09, 2006 11:59 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Location: Canada

Re: [Idea] - AI Image Tagging - Is this something we can use for TeaseAI etc?

Post by Helequin »

Thanks for the reply! Didn't mean to get so technical, so I've run a quick edit of the OP and added a TL:DR to make things more clear I hope.

Yes, tagging is somewhat personal and IIRC even different personalities or iterations of TeaseAI have used them differently. An overall mostly automated approach to tagging might help add consistency to both how images are tagged and how the program uses them.

As for the interrogator (tagging) models, from my small experience with them:

CLIP and BLIP - both try to describe the image in a sentence. (e.g. Output something like: A topless brunette woman with pierced nipples and red panties sitting by the pool.) Probably not great for tagging purposes.

WD1.4 - creates a list of tags. Easiest to show some sample outputs. Text is below the sample image. I've used a variety of image types here from solo to femdom to hardcore to give an idea what the tags can identify.
Spoiler: show
Half Dressed - Boobs (9).jpg
Half Dressed - Boobs (9).jpg (248.59 KiB) Viewed 1889 times
1girl, solo, breasts, nipples, clothes lift, pants, navel, shirt lift, jeans, jewelry, denim, lifted by self, brown hair, realistic, bracelet, smile, indoors, medium breasts, freckles, tattoo, looking at viewer, brown eyes, shirt, mole, window, long hair, standing, no bra, lips, piercing, yellow shirt, earrings

ND - Legs (1).jpg
ND - Legs (1).jpg (222.81 KiB) Viewed 1889 times
1girl, jewelry, solo, nipples, ring, pussy, thighhighs, glasses, earrings, pubic hair, high heels, female pubic hair, necklace, anus, looking at viewer, nude, spread legs, spread pussy, breasts, black nails, makeup, lips, short hair, navel, nail polish, brown hair, black footwear, presenting, black hair, realistic, uncensored, lipstick, lace-trimmed legwear, small breasts, mole, brown eyes, censored

0096.jpg
0096.jpg (560.33 KiB) Viewed 1889 times
1girl, solo, ass, sneakers, squatting, anus, bottomless, pussy, outdoors, shoes, day, looking back, ponytail, pubic hair, from behind, long hair, sports bra, open mouth, uncensored, looking at viewer, female pubic hair, socks, brown hair, black hair, teeth, white sports bra, public indecency, spread legs, bush, exhibitionism, back, upper teeth only

_tyc archive (29).jpg
_tyc archive (29).jpg (190.74 KiB) Viewed 1889 times
1girl, sex, hetero, 1boy, penis, anal, ass, nude, looking back, reverse cowgirl position, realistic, sex from behind, straddling, nail polish, male pubic hair, uncensored, long hair, red nails, pubic hair, solo focus, thighhighs, girl on top, lips, vaginal, open mouth, bed, pov
tumblr_nj1ugxEj291tbwymvo1_1280.jpg
tumblr_nj1ugxEj291tbwymvo1_1280.jpg (103.31 KiB) Viewed 1889 times
penis, hetero, 2girls, multiple girls, cum, 1boy, realistic, facial, brown hair, ejaculation, nude, closed eyes, tongue, ffm threesome, group sex, threesome, uncensored

299_1000.jpg
299_1000.jpg (228.84 KiB) Viewed 1889 times
strap-on, 1girl, thighhighs, brown hair, hetero, 1boy, corset, penis, shoes, sex, high heels, tattoo, anal, long hair, fishnets, testicles, sex toy, nipples, couch, dildo, breasts, solo focus, sex from behind, object insertion, black footwear, garter straps, underwear
And to clarify the structure of how WD1.4 tends to work. If I run the tagger on a folder containing the images 1.jpg, 2.jpg and 3.jpg, WD1.4 will create the text files 1.txt, 2.txt and 3.txt for each tag output.

Hopefully that helps makes things more clear!
Playing Help Me Cum Please!
Choosing a Goddess - a set for anyone to play
The 1000th Reply Celebration Challenge and it's Finale - an ongoing challenge to try
Co-author of Kyla's Party - webtease based on Help me Cum Please.


Miss Elyna's Cum Challenge Winner
User avatar
markus
Explorer At Heart
Explorer At Heart
Posts: 663
Joined: Tue Nov 18, 2008 11:09 pm

Re: [Idea] - AI Image Tagging - Is this something we can use for TeaseAI etc?

Post by markus »

Helequin wrote: Thu Feb 16, 2023 12:05 am Thanks for the reply!
Thank you for the examples and for bringing up such an interesting topic. 8-)
and added a TL:DR to make
Ehmmm, ... ok, looked up 'TL:DR', ... got it! :lol: :-P ;-)

WD1.4 - creates a list of tags. Easiest to show some sample outputs. Text is below the sample image. I've used a variety of image types here from solo to femdom to hardcore to give an idea what the tags can identify.
Ok, WOW, ... those examples are really impressive! :w00t:
This really makes me think that I should go back to coding and skip the scripting for a while, ... the 'coding-to-do-list' is piling up anyway for quite some time now even without this.

Don't get me wrong, I won't promise anything, except that I will definitely take a closer look into this, but even if I could make something out of this, then it would take it's time.
Again, great topic you brought up, THX again for that! :thumbsup:

And to clarify the structure of how WD1.4 tends to work. If I run the tagger on a folder containing the images 1.jpg, 2.jpg and 3.jpg, WD1.4 will create the text files 1.txt, 2.txt and 3.txt for each tag output.
Mhhh, ... questions:
- Does the WD1.4 created textfile contains the filepath ( + filename ) of the picture?
- Does that WD1.4 place the created textfiles into the same directory as the picture is in?

... The problem I see here, if the textfile doesn't contain the filepath and name, ... if you have one folder and maybe a '1.jpg' AND a '1.bmp' ... would it create two textfiles for both different pictures with the same name but a different extension on them?

Looking forward for the answers. :yes:


Best greetings,
Markus
User avatar
Helequin
Experimentor
Experimentor
Posts: 1062
Joined: Sat Sep 09, 2006 11:59 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Location: Canada

Re: [Idea] - AI Image Tagging - Is this something we can use for TeaseAI etc?

Post by Helequin »

Yes, it's definitely impressive how much detail these interrogator models can pick up on.

Oh yeah, there's obviously no pressure on anyone to work on this. But it just struck me that the image recognition tech is now good enough where it probably could be done. That and hooking into something like WD1.4 means all the image recognition stuff is already done.

Let me just give a more full example of folder structure to clarify:
Spoiler: show
If I have

Folder containing:
Blowjob.gif, Gorgeous.png, SexyImage.jpg, SteamyImage.jpg

Then run WD1.4 in that folder I will have the contents:
Blowjob.gif, Blowjob.txt, Gorgeous.png, Gorgeous.txt, SexyImage.jpg, SexyImage.txt, SteamyImage.jpg, SteamyImage.txt

Opening Gorgeous.txt it would contain something like:
1girl, solo, breasts, nipples, clothes lift, pants, navel, shirt lift, jeans, jewelry, denim, lifted by self, brown hair, realistic, bracelet, smile, indoors, medium breasts, freckles, tattoo, looking at viewer, brown eyes, shirt, mole, window, long hair, standing, no bra, lips, piercing, yellow shirt, earring
So yes, I imagine there would be a conflict if you had two files with the same name but different extensions. The text files are in the same directory with the same name (but not extension) as the image files.

I'm not sure if it's possible to hook into the code of WD1.4 earlier on though and change how it's outputting. Probably. At a simple level I was thinking of some way to just take the WD1.4 text files and somehow read and translate them into a TeaseAI friendly format.

The other tricky bit may be translating all the many tags WD1.4 can output and working out what that translates to. For example 'breasts' get tagged covered or not. 'Topless' or 'nipples' seem to imply upper nudity.
Playing Help Me Cum Please!
Choosing a Goddess - a set for anyone to play
The 1000th Reply Celebration Challenge and it's Finale - an ongoing challenge to try
Co-author of Kyla's Party - webtease based on Help me Cum Please.


Miss Elyna's Cum Challenge Winner
User avatar
markus
Explorer At Heart
Explorer At Heart
Posts: 663
Joined: Tue Nov 18, 2008 11:09 pm

Re: [Idea] - AI Image Tagging - Is this something we can use for TeaseAI etc?

Post by markus »

Helequin wrote: Fri Feb 17, 2023 3:23 am Oh yeah, there's obviously no pressure on anyone to work on this. But it just struck me that the image recognition tech is now good enough where it probably could be done. That and hooking into something like WD1.4 means all the image recognition stuff is already done.
I make the pressure on my own myself, ... this really is something I just have to look up more deeply (as soon as I find the time), ... if it turns out how I hope, ... there might be even more possibilities than just only tagging.

So yes, I imagine there would be a conflict if you had two files with the same name but different extensions. The text files are in the same directory with the same name (but not extension) as the image files.
Well, that's not perfect, but at least they are in the matching folders (if not, THAT would be a problem, ... like I have a lot of folders with pictures enumerated like 001.jpg and so on), ... but in different folders that's good enough for starters, ... it would be up to the user to make sure to sort the pictures properly, but I guess such cases are rare anyway (in which you have 1.jpg AND 1.bmp in the same folder).

The other tricky bit may be translating all the many tags WD1.4 can output and working out what that translates to. For example 'breasts' get tagged covered or not. 'Topless' or 'nipples' seem to imply upper nudity.
Of course that would need some testing, some trial and error, ... and also to take in consideration if that's domme-tags or local tags.

For domme tags: From your example I could think of:
If 'breasts' plus 'nipples' is given OR 'breasts' plus 'Topless' is given the tag could be 'TagBoobs TagNaked'
I guess that's not too tricky, still some work, yeah, but not too tricky.

Local tags might be even more easy, ... existing ones has to be translated accordingly, ... but the way it works (at least in Awakening) is that new local tags are possible as well, then it would be up to the scripter to use them.
(I once gave an example, you could use '@ShowTaggedImage @TagErnieAndBert' -> as long as in the LocalImageTags.txt there is a picture tagged like that it will be displayed).

At a simple level I was thinking of some way to just take the WD1.4 text files and somehow read and translate them into a TeaseAI friendly format.
That would be the most easy part of all, ... reading text-files, analyse them (i.e. script commands) is what Tai does anyway.

Best greetings,
Markus
User avatar
Helequin
Experimentor
Experimentor
Posts: 1062
Joined: Sat Sep 09, 2006 11:59 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Location: Canada

Re: [Idea] - AI Image Tagging - Is this something we can use for TeaseAI etc?

Post by Helequin »

Yes, agreed. Image interrogation tech like this could enable a whole lot more than just the more basic tags TeaseAI uses.

As for figuring out the tags, yes there will be some trial and sorting needed. The list here might help with tracking the logic of what gets tagged with what: https://danbooru.donmai.us/wiki_pages/tag_groups

Interesting, I didn't realize Awakening could respond to other custom tags. That really opens up possibilities. I keep meaning to try Awakening but never seem to find the time to set it up (currently have not TAI setup at all so it would be starting from scratch other than image libraries).

True on reading text files. Or it should be easy enough for an separate app to read in, translate and write out into a TeaseAI friendly format too. Sadly I lack the expertise and time to take a crack at doing that myself any time soon. If I have some time to kill one day I might see if I can decode some of the logic though. :lol:
Playing Help Me Cum Please!
Choosing a Goddess - a set for anyone to play
The 1000th Reply Celebration Challenge and it's Finale - an ongoing challenge to try
Co-author of Kyla's Party - webtease based on Help me Cum Please.


Miss Elyna's Cum Challenge Winner
sblatt
Explorer
Explorer
Posts: 18
Joined: Sun Jan 15, 2012 6:22 pm

Re: [Idea] - AI Image Tagging - Is this something we can use for TeaseAI etc?

Post by sblatt »

I actually have a script i used to do basic tagging on all collections, it's posted here and imho it does a decent job:
viewtopic.php?t=23961
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests