Bionus / imgbrd-grabber

Very customizable imageboard/booru downloader with powerful filenaming features.
https://www.bionus.org/imgbrd-grabber/
Apache License 2.0
2.41k stars 212 forks source link

Option to only download samples / thumbnails? #949

Open can1357 opened 7 years ago

can1357 commented 7 years ago

Although I've searched all the options in Grabber I wasn't able to find a "download thumbnails" or "download samples" option. I am a deep-learning researcher and the ability to download low-quality alternatives is very convenient when batch downloading > 20k images.

It would be awesome if this could be supported officially.

Excuse me if this feature already exits and I was incapable of finding it, Can

Temporary solution for windows users: Byte-patch [Grabber.exe + 0xD7507] to 0xC (Build: 25 May)

Zekken01 commented 7 years ago

If I may ask, What are you trying to teach an AI with images downloaded from boorus?

can1357 commented 7 years ago

@brodycas3 auto tagging pictures & feature extraction. So far in my experiments I was able to do searches in untagged pictures (not from boorus) based on the training done using tagged pictures (from boorus) similar to: get_vector("blond") + get_vector("fang") or get_vector(picture) - get_vector("naked"). Quite fun actually.

Zekken01 commented 7 years ago

That seems pretty interesting.

MasterPetrik commented 7 years ago

@can1357 maybe you will be interested about already existed tag logging feature https://github.com/Bionus/imgbrd-grabber/issues/874

and do you heard about Hidrus project?(Sorry, Bionus) It's anime DB with cloud tags storage, marking by community. There are exist almost 15 GB hash-tags info(downloads separately) about almost all images from all boorus https://github.com/hydrusnetwork/hydrus and here is a thread with all tag archives for it https://8ch.net/hydrus/res/2651.html

And moreover, there is already exist anime images tag predicting deep AI neetwork: http://demo.illustration2vec.net/# And it works almost perfect: image

So if you gonna work with tag recognition, I hope some of this will help you, good luck!

I'm interested in mashine learning by myself(as user), so If you will have some progress, please tell me about that)

can1357 commented 7 years ago

@MasterPetrik I didnt know about the tag logging feature nor about the Hidrus project; good to know about! I'll definitely let you know if I have some notable results. Illust2Vec seems to work quite good though; quite impressive.

MasterPetrik commented 7 years ago

looks like they even giving they Pre-trained model for free: http://illustration2vec.net

Bionus commented 7 years ago

There is no current way to download thumbnails. There is an option in the settings to download samples but I can't guarantee you it's working properly on all source.

I could add a new CLI option to download or return the URLs of thumbnail/samples though. Depending on the sources you're using, you could also directly build these URLs from the full image URL.

If the source is danbooru-based for example, the image https://danbooru.donmai.us/data/93e6d0d665c373bd6c5c9df8088b501e.jpg will have a thumb located at https://danbooru.donmai.us/data/preview/93e6d0d665c373bd6c5c9df8088b501e.jpg: simply replace /data/ with /data/preview/. Same thing for samples, except you have to replace /data/ with /data/sample/sample-, and not all images have samples.

can1357 commented 7 years ago

The bytepatch I do changes: https://github.com/Bionus/imgbrd-grabber/blob/88bfbd66b2693387f05bf0f33d2bb7ad8737dd2a/lib/src/models/image.cpp#L203 m_url = m_fileUrl.toString(); -> m_url = m_previewUrl.toString(); and it seems to work fine for most images. It'd be really cool if you could add it @Bionus.

Where's the download samples option thought I cant seem to be able to find it 😕

Bionus commented 7 years ago

The bytepatch I do changes

You also have m_sampleUrl if I remember correctly.

It'd be really cool if you could add it @Bionus.

I'll add it as a CLI option in the next update. Since it seems you're building from source (:question:) you can grab the develop branch when you see one of my commits referenced in this issue.

Where's the download samples option thought I cant seem to be able to find it 😕

image

If you don't check the first box ("Download original images") it should download samples when available.

can1357 commented 7 years ago

I was byte-patching the already-built executable file because I do not like to deal with Qt. Anyway, thanks a lot for considering the addition of this feature :)