From: Arcnilya Date: Fri, 18 Mar 2022 15:11:01 +0000 (+0100) Subject: Paper update X1 X-Git-Url: https://git.hentai-ai.org/?a=commitdiff_plain;h=d6acce366e888a28bf4234fe88c43ff71b84ffa1;p=papers%2FwAiFu.git%2F.git Paper update X1 --- diff --git a/img/data_sets.png b/img/data_sets.png new file mode 100644 index 0000000..89c2621 Binary files /dev/null and b/img/data_sets.png differ diff --git a/ref.bib b/ref.bib index 47c3d98..f5db0f9 100644 --- a/ref.bib +++ b/ref.bib @@ -42,3 +42,10 @@ month = mar, year = {2022}, howpublished={\url{https://github.com/foobar167/junkyard/blob/master/zoom\_advanced.py}} } +@MISC{thighdeology, +author = {Reddit}, +title = {Thighdeology Subreddit}, +month = mar, +year = {2022}, +howpublished={\url{www.reddit.com/r/thighdeology}} +} diff --git a/wAiFu.aux b/wAiFu.aux index 61168d5..b9f7bb1 100644 --- a/wAiFu.aux +++ b/wAiFu.aux @@ -28,6 +28,7 @@ \newlabel{fig:ai}{{1}{1}{Relation between Artificial Intelligence, Machine Learning and Deep Learning}{figure.1}{}} \@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {II-B}}Hentai and Thighdeology}{1}{subsection.2.2}\protected@file@percent } \newlabel{sec:hentai}{{\mbox {II-B}}{1}{Hentai and Thighdeology}{subsection.2.2}{}} +\citation{thighdeology} \citation{fastai} \@writefile{toc}{\contentsline {section}{\numberline {III}Method}{2}{section.3}\protected@file@percent } \newlabel{sec:method}{{III}{2}{Method}{section.3}{}} @@ -37,45 +38,48 @@ \newlabel{sec:design}{{IV}{2}{Design}{section.4}{}} \@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {IV-A}}Data Collection}{2}{subsection.4.1}\protected@file@percent } \newlabel{sec:datacollection}{{\mbox {IV-A}}{2}{Data Collection}{subsection.4.1}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {IV-B}}Data Transformation}{2}{subsection.4.2}\protected@file@percent } -\newlabel{sec:datatransformation}{{\mbox {IV-B}}{2}{Data Transformation}{subsection.4.2}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {IV-B}}Data Preparation}{2}{subsection.4.2}\protected@file@percent } +\newlabel{sec:dataprep}{{\mbox {IV-B}}{2}{Data Preparation}{subsection.4.2}{}} \@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {IV-C}}Data Labeling}{2}{subsection.4.3}\protected@file@percent } \newlabel{sec:datalabeling}{{\mbox {IV-C}}{2}{Data Labeling}{subsection.4.3}{}} \@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {IV-D}}fastai}{2}{subsection.4.4}\protected@file@percent } \newlabel{sec:fastai}{{\mbox {IV-D}}{2}{fastai}{subsection.4.4}{}} \citation{zoom-advanced} -\bibdata{ref} -\bibcite{zoom-advanced}{1} -\bibcite{fastai}{2} -\bibcite{deeplearning}{3} \@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces The protocol of reviewing thighs using boolean labeling}}{3}{figure.2}\protected@file@percent } \newlabel{fig:protocol}{{2}{3}{The protocol of reviewing thighs using boolean labeling}{figure.2}{}} \@writefile{toc}{\contentsline {section}{\numberline {V}Implementation}{3}{section.5}\protected@file@percent } \newlabel{sec:implementation}{{V}{3}{Implementation}{section.5}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {V-A}}Data Transformations}{3}{subsection.5.1}\protected@file@percent } -\newlabel{sec:datatfms}{{\mbox {V-A}}{3}{Data Transformations}{subsection.5.1}{}} +\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Visualization of the three sets of data}}{3}{figure.3}\protected@file@percent } +\newlabel{fig:data_sets}{{3}{3}{Visualization of the three sets of data}{figure.3}{}} +\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces Training image without batch transforms}}{3}{figure.4}\protected@file@percent } +\newlabel{fig:wobt}{{4}{3}{Training image without batch transforms}{figure.4}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {V-A}}Data Preparation}{3}{subsection.5.1}\protected@file@percent } +\newlabel{sec:datatfms}{{\mbox {V-A}}{3}{Data Preparation}{subsection.5.1}{}} \@writefile{toc}{\contentsline {subsubsection}{\numberline {\mbox {V-A}1}Convert and Rename}{3}{subsubsection.5.1.1}\protected@file@percent } \@writefile{toc}{\contentsline {subsubsection}{\numberline {\mbox {V-A}2}Cropping Images}{3}{subsubsection.5.1.2}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {V-B}}Label App: Hentai Tinder}{3}{subsection.5.2}\protected@file@percent } \newlabel{sec:impl_labelapp}{{\mbox {V-B}}{3}{Label App: Hentai Tinder}{subsection.5.2}{}} -\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Training image without batch transforms}}{3}{figure.3}\protected@file@percent } -\newlabel{fig:wobt}{{3}{3}{Training image without batch transforms}{figure.3}{}} -\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces Training image with batch transforms}}{3}{figure.4}\protected@file@percent } -\newlabel{fig:wbt}{{4}{3}{Training image with batch transforms}{figure.4}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {V-C}}Deep Learning with fastai}{3}{subsection.5.3}\protected@file@percent } -\newlabel{sec:impl_deeplearning}{{\mbox {V-C}}{3}{Deep Learning with fastai}{subsection.5.3}{}} -\@writefile{toc}{\contentsline {section}{\numberline {VI}Results}{3}{section.6}\protected@file@percent } -\newlabel{sec:results}{{VI}{3}{Results}{section.6}{}} -\@writefile{toc}{\contentsline {section}{\numberline {VII}Discussion}{3}{section.7}\protected@file@percent } -\newlabel{sec:discussion}{{VII}{3}{Discussion}{section.7}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {VII-A}}Transforms}{3}{subsection.7.1}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {VII-B}}Limitations}{3}{subsection.7.2}\protected@file@percent } -\newlabel{sec:limitations}{{\mbox {VII-B}}{3}{Limitations}{subsection.7.2}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {VII-C}}Future Work}{3}{subsection.7.3}\protected@file@percent } -\newlabel{sec:futurework}{{\mbox {VII-C}}{3}{Future Work}{subsection.7.3}{}} -\@writefile{toc}{\contentsline {section}{\numberline {VIII}Conclusion}{3}{section.8}\protected@file@percent } +\bibdata{ref} +\bibcite{zoom-advanced}{1} +\bibcite{fastai}{2} +\bibcite{deeplearning}{3} \bibcite{machinelearning}{4} +\bibcite{thighdeology}{5} \bibstyle{plain} -\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces Comparing with and without batch transforms on error\_rate, train\_loss and valid\_loss}}{4}{figure.5}\protected@file@percent } -\newlabel{fig:btgraph}{{5}{4}{Comparing with and without batch transforms on error\_rate, train\_loss and valid\_loss}{figure.5}{}} +\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces Training image with batch transforms}}{4}{figure.5}\protected@file@percent } +\newlabel{fig:wbt}{{5}{4}{Training image with batch transforms}{figure.5}{}} +\@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces Comparing with and without batch transforms on error\_rate, train\_loss and valid\_loss}}{4}{figure.6}\protected@file@percent } +\newlabel{fig:btgraph}{{6}{4}{Comparing with and without batch transforms on error\_rate, train\_loss and valid\_loss}{figure.6}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {V-C}}Deep Learning with fastai}{4}{subsection.5.3}\protected@file@percent } +\newlabel{sec:impl_deeplearning}{{\mbox {V-C}}{4}{Deep Learning with fastai}{subsection.5.3}{}} +\@writefile{toc}{\contentsline {section}{\numberline {VI}Results}{4}{section.6}\protected@file@percent } +\newlabel{sec:results}{{VI}{4}{Results}{section.6}{}} +\@writefile{toc}{\contentsline {section}{\numberline {VII}Discussion}{4}{section.7}\protected@file@percent } +\newlabel{sec:discussion}{{VII}{4}{Discussion}{section.7}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {VII-A}}Transforms}{4}{subsection.7.1}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {VII-B}}Limitations}{4}{subsection.7.2}\protected@file@percent } +\newlabel{sec:limitations}{{\mbox {VII-B}}{4}{Limitations}{subsection.7.2}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {VII-C}}Future Work}{4}{subsection.7.3}\protected@file@percent } +\newlabel{sec:futurework}{{\mbox {VII-C}}{4}{Future Work}{subsection.7.3}{}} +\@writefile{toc}{\contentsline {section}{\numberline {VIII}Conclusion}{4}{section.8}\protected@file@percent } \@writefile{toc}{\contentsline {section}{References}{4}{section*.2}\protected@file@percent } diff --git a/wAiFu.bbl b/wAiFu.bbl index 40e1920..bd28b08 100644 --- a/wAiFu.bbl +++ b/wAiFu.bbl @@ -22,4 +22,9 @@ Tom~M Mitchell et~al. \newblock Machine learning. \newblock 1997. +\bibitem{thighdeology} +Reddit. +\newblock Thighdeology subreddit. +\newblock \url{www.reddit.com/r/thighdeology}, March 2022. + \end{thebibliography} diff --git a/wAiFu.blg b/wAiFu.blg index 2b2810e..f53279f 100644 --- a/wAiFu.blg +++ b/wAiFu.blg @@ -4,45 +4,45 @@ The top-level auxiliary file: wAiFu.aux The style file: plain.bst Database file #1: ref.bib Warning--empty journal in machinelearning -You've used 4 entries, +You've used 5 entries, 2118 wiz_defined-function locations, - 522 strings with 4384 characters, -and the built_in function-call counts, 1114 in all, are: -= -- 106 -> -- 51 + 526 strings with 4459 characters, +and the built_in function-call counts, 1324 in all, are: += -- 126 +> -- 58 < -- 0 -+ -- 20 -- -- 16 -* -- 73 -:= -- 199 -add.period$ -- 12 -call.type$ -- 4 -change.case$ -- 19 ++ -- 23 +- -- 18 +* -- 81 +:= -- 234 +add.period$ -- 15 +call.type$ -- 5 +change.case$ -- 23 chr.to.int$ -- 0 -cite$ -- 5 -duplicate$ -- 39 -empty$ -- 90 -format.name$ -- 16 -if$ -- 225 +cite$ -- 6 +duplicate$ -- 46 +empty$ -- 112 +format.name$ -- 18 +if$ -- 271 int.to.chr$ -- 0 -int.to.str$ -- 4 +int.to.str$ -- 5 missing$ -- 3 -newline$ -- 23 -num.names$ -- 8 -pop$ -- 21 +newline$ -- 28 +num.names$ -- 10 +pop$ -- 29 preamble$ -- 1 -purify$ -- 15 +purify$ -- 18 quote$ -- 0 -skip$ -- 31 +skip$ -- 38 stack$ -- 0 -substring$ -- 54 -swap$ -- 3 +substring$ -- 59 +swap$ -- 4 text.length$ -- 0 text.prefix$ -- 0 top$ -- 0 -type$ -- 16 +type$ -- 20 warning$ -- 1 -while$ -- 11 -width$ -- 5 -write$ -- 43 +while$ -- 13 +width$ -- 6 +write$ -- 53 (There was 1 warning) diff --git a/wAiFu.log b/wAiFu.log index 4693292..bb741d6 100644 --- a/wAiFu.log +++ b/wAiFu.log @@ -1,4 +1,4 @@ -This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2021.10.22) 17 MAR 2022 18:59 +This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2021.10.22) 18 MAR 2022 16:00 entering extended mode restricted \write18 enabled. %&-line parsing enabled. @@ -454,55 +454,70 @@ Package pdftex.def Info: img/ai_diagram.pdf used on input line 53. pdfTeX warning: pdflatex (file ./img/thighs_diagram.drawio.pdf): PDF inclusion: found PDF version <1.7>, but at most version <1.5> allowed - + File: img/thighs_diagram.drawio.pdf Graphic file (type pdf) -Package pdftex.def Info: img/thighs_diagram.drawio.pdf used on input line 123. +Package pdftex.def Info: img/thighs_diagram.drawio.pdf used on input line 122. (pdftex.def) Requested size: 258.0pt x 161.67961pt. -Overfull \hbox (6.0pt too wide) in paragraph at lines 123--124 +Overfull \hbox (6.0pt too wide) in paragraph at lines 122--123 [][] [] - -LaTeX Warning: `h' float specifier changed to `ht'. - [2] - +LaTeX Font Info: Trying to load font information for OT1+pcr on input line 1 +35. + (/usr/share/texlive/texmf-dist/tex/latex/psnfss/ot1pcr.fd +File: ot1pcr.fd 2001/06/04 font definitions for OT1/pcr. +) + +File: img/data_sets.png Graphic file (type png) + +Package pdftex.def Info: img/data_sets.png used on input line 138. +(pdftex.def) Requested size: 258.0pt x 61.5058pt. + +Overfull \hbox (6.0pt too wide) in paragraph at lines 138--139 +[][] + [] + + File: img/no_batch_transform1.png Graphic file (type png) -Package pdftex.def Info: img/no_batch_transform1.png used on input line 178. +Package pdftex.def Info: img/no_batch_transform1.png used on input line 185. (pdftex.def) Requested size: 258.0pt x 106.71788pt. -Overfull \hbox (12.79999pt too wide) in paragraph at lines 178--179 +Overfull \hbox (12.79999pt too wide) in paragraph at lines 185--186 [][] [] - + File: img/with_batch_transform2.png Graphic file (type png) -Package pdftex.def Info: img/with_batch_transform2.png used on input line 184. +Package pdftex.def Info: img/with_batch_transform2.png used on input line 191. (pdftex.def) Requested size: 258.0pt x 106.71788pt. -Overfull \hbox (12.79999pt too wide) in paragraph at lines 184--185 +Overfull \hbox (12.79999pt too wide) in paragraph at lines 191--192 [][] [] - + File: img/with_vs_without_batch_transforms.png Graphic file (type png) Package pdftex.def Info: img/with_vs_without_batch_transforms.png used on inpu -t line 190. +t line 197. (pdftex.def) Requested size: 258.0pt x 247.09715pt. -Overfull \hbox (6.0pt too wide) in paragraph at lines 190--191 +Overfull \hbox (6.0pt too wide) in paragraph at lines 197--198 [][] [] -(./wAiFu.bbl [3 <./img/thighs_diagram.drawio.pdf> <./img/no_batch_transform1.pn -g> <./img/with_batch_transform2.png>]) + +Underfull \vbox (badness 5460) has occurred while \output is active [] + + [3 <./img/thighs_diagram.drawio.pdf> <./img/data_sets.png (PNG copy)> <./img/n +o_batch_transform1.png>] (./wAiFu.bbl) ** Conference Paper ** Before submitting the final camera ready copy, remember to: @@ -514,39 +529,35 @@ Before submitting the final camera ready copy, remember to: uses only Type 1 fonts and that every step in the generation process uses the appropriate paper size. -Package atveryend Info: Empty hook `BeforeClearDocument' on input line 211. -[4 - - <./img/with_vs_without_batch_transforms.png>] -Package atveryend Info: Empty hook `AfterLastShipout' on input line 211. +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 220. +[4 <./img/with_batch_transform2.png> <./img/with_vs_without_batch_transforms.pn +g>] +Package atveryend Info: Empty hook `AfterLastShipout' on input line 220. (./wAiFu.aux) -Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 211. -Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 211. +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 220. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 220. Package rerunfilecheck Info: File `wAiFu.out' has not changed. -(rerunfilecheck) Checksum: EB6C63F2C37B78372EA8BED5864B53A7;1419. - - -LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. - -Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 211. +(rerunfilecheck) Checksum: 0EC91037E12490871CD5DA593DEDCF9F;1412. +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 220. ) Here is how much of TeX's memory you used: - 7800 strings out of 483183 - 117939 string characters out of 5966291 - 384804 words of memory out of 5000000 - 22632 multiletter control sequences out of 15000+600000 - 576908 words of font info for 112 fonts, out of 8000000 for 9000 + 7845 strings out of 483183 + 118597 string characters out of 5966291 + 385892 words of memory out of 5000000 + 22670 multiletter control sequences out of 15000+600000 + 577423 words of font info for 114 fonts, out of 8000000 for 9000 14 hyphenation exceptions out of 8191 - 34i,11n,37p,877b,455s stack positions out of 5000i,500n,10000p,200000b,80000s + 34i,11n,37p,1356b,455s stack positions out of 5000i,500n,10000p,200000b,80000s {/usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc} -Output written on wAiFu.pdf (4 pages, 1281908 bytes). +-dist/fonts/type1/urw/courier/ucrr8a.pfb> +Output written on wAiFu.pdf (4 pages, 1299835 bytes). PDF statistics: - 223 PDF objects out of 1000 (max. 8388607) - 191 compressed objects within 2 object streams - 45 named destinations out of 1000 (max. 500000) - 218 words of extra memory for PDF output out of 10000 (max. 10000000) + 230 PDF objects out of 1000 (max. 8388607) + 196 compressed objects within 2 object streams + 46 named destinations out of 1000 (max. 500000) + 223 words of extra memory for PDF output out of 10000 (max. 10000000) diff --git a/wAiFu.out b/wAiFu.out index e587b03..0f822e2 100644 --- a/wAiFu.out +++ b/wAiFu.out @@ -6,11 +6,11 @@ \BOOKMARK [2][-]{subsection.3.1}{wAiFu Framework}{section.3}% 6 \BOOKMARK [1][-]{section.4}{Design}{}% 7 \BOOKMARK [2][-]{subsection.4.1}{Data Collection}{section.4}% 8 -\BOOKMARK [2][-]{subsection.4.2}{Data Transformation}{section.4}% 9 +\BOOKMARK [2][-]{subsection.4.2}{Data Preparation}{section.4}% 9 \BOOKMARK [2][-]{subsection.4.3}{Data Labeling}{section.4}% 10 \BOOKMARK [2][-]{subsection.4.4}{fastai}{section.4}% 11 \BOOKMARK [1][-]{section.5}{Implementation}{}% 12 -\BOOKMARK [2][-]{subsection.5.1}{Data Transformations}{section.5}% 13 +\BOOKMARK [2][-]{subsection.5.1}{Data Preparation}{section.5}% 13 \BOOKMARK [3][-]{subsubsection.5.1.1}{Convert and Rename}{subsection.5.1}% 14 \BOOKMARK [3][-]{subsubsection.5.1.2}{Cropping Images}{subsection.5.1}% 15 \BOOKMARK [2][-]{subsection.5.2}{Label App: Hentai Tinder}{section.5}% 16 diff --git a/wAiFu.pdf b/wAiFu.pdf index ac60882..228fb67 100644 Binary files a/wAiFu.pdf and b/wAiFu.pdf differ diff --git a/wAiFu.tex b/wAiFu.tex index 6cf5c63..bcaf46a 100644 --- a/wAiFu.tex +++ b/wAiFu.tex @@ -23,7 +23,7 @@ \maketitle \begin{abstract} - For too many years have the world of Artificial Intelligence and the world of Hentai been separate ecosystems in which they do not realize the powerful potential of an alliance. Project Hentai AI aims to bring Artificial Intelligence into the sphere of Hentai, Ecchi and Lewds. In this paper, we propose a Witty Artificial Intelligence Framework Utilization (wAiFu). This framework is built for collecting data, labeling data, and training machine learning models to rate images of lewd anime/manga and hentai. As a proof of concept, this framework is applied to lewd anime thighs. A dataset is collected, transformed and labeled before being loaded into a fastai implementation of a Convolutional Neural Network designed for Computer Vision. The retraining of a resnet34 model for 10 epoch resulted in an accuracy of 70\%, which is much better than a cointoss. + For too many years have the world of Artificial Intelligence and the world of Hentai been separate ecosystems in which they do not realize the powerful potential of an alliance. Project Hentai AI aims to bring Artificial Intelligence into the sphere of Hentai, Ecchi and Lewds. In this paper, we propose a Witty Artificial Intelligence Framework Utilization (wAiFu). This framework is built for processing and labeling data, as well as training machine learning models to rate images of lewd anime/manga and hentai. As a proof of concept, this framework is applied to images of lewd anime thighs labeled using a boolean method. A dataset is collected, processed and labeled before being loaded into a fastai implementation of a Convolutional Neural Network designed for Computer Vision. The retraining of a resnet34 model for 10 epoch resulted in an accuracy of 70\%, which is much better than a cointoss. \end{abstract} \begin{IEEEkeywords} @@ -59,11 +59,10 @@ Machine Learning and Deep Learning falls under the discipline of Artificial Inte \subsection{Hentai and Thighdeology} \label{sec:hentai} For the purpose of this study and future studies in Project Hentai AI, the data in the datasets are categorised in three definitions: \emph{Hentai}, \emph{Ecchi} and \emph{Lewd}. -In its simplest definition, Hentai is simply anime and manga pornography and can be seen as the most extreme out of the three. Ecchi on the other hand, when used as an adjective, translates to ``sexy'', ``dirty'' or ``naughty'', and has been used to describe anime and manga with \emph{sexual overtones} (playful sexuality or softcore). Lewd in these studies is defined as \emph{sexual undertones}. -Contrary to its name, Project Hentai AI includes ecchi and lewd as well but the name of the project uses the term hentai for simplicity. +In its simplest definition, Hentai is simply anime and manga pornography and can be seen as the most extreme out of the three. Ecchi on the other hand, when used as an adjective, translates to ``sexy'', ``dirty'' or ``naughty'', and has been used to describe anime and manga with \emph{sexual overtones} (playful sexuality or softcore). Lewd in these studies is defined as \emph{sexual undertones}. A detailed differentiation between these three categories is planned for a separate study. Project Hentai AI includes ecchi and lewd as well even though the name of the project uses the term hentai. -Thighdeology is the worship of thick anime thighs which has its Mecca on the Thighdeology subreddit\footnote{\url{https://www.reddit.com/r/thighdeology/}}. -The top two rules on the subreddit are: (1) All images must be thigh-focused and (2) No Pictures of Sex (Nudity is allowed). The second rule is a clear demonstration of the distinction between hentai and ecchi described above. +Thighdeology is the worship of thick anime thighs which has its Mecca on the Thighdeology subreddit~\cite{thighdeology}. +The top two rules on the subreddit are: (1) All images must be thigh-focused and (2) No Pictures of Sex (Nudity is allowed). The second rule is a clear demonstration of the distinction between hentai and ecchi described above. The dataset used for wAiFu is images of lewd anime thighs in accordance with these two top rules. The epigraph which crowns the website says it all: \begin{quote} \emph{``Blessed is the man that walketh not in the counsel of the ungodly, nor standeth in the way of sinners, nor sitteth in the seat of the scornful. But his delight is in the law of the THICC anime thighs.''} @@ -78,7 +77,7 @@ Witty Artificial Intelligence Framework Utilization. \section{Design} \label{sec:design} \subsection{Data Collection} \label{sec:datacollection} -\noindent The data was collected manually from six separate sources: +\noindent A dataset of lewd anime thighs was manually collected from six separate sources: \begin{itemize} \item Discord Server: All Things Hentai \item Discord Server: Hanako's Hideout\footnote{formerly known as r/Hentai Group prior to 13th April 2021} @@ -88,14 +87,14 @@ Witty Artificial Intelligence Framework Utilization. \item Private Donations \end{itemize} -~\\\noindent After collection, the data was manually screened for (A) presence of thighs (B) image quality and (C) image ``cropability''. The presence of thighs simply implies that the image in question contains a section of the lower body of a humanoid character. The vast majority of the characters depicted in the images collected were of the feminine nature, although this was most likely due to the skewed ratio of feminine/masculine thighs from the sources themselves and not due to any discrimination during the manual collecting. This is further discussed within limitations in Section~\ref{sec:limitations}. +~\\\noindent After collection, the data was manually screened for (A) presence of thighs (B) image quality and (C) image \emph{cropability}. The presence of thighs simply implies that the image in question contains a section of the lower body of a humanoid character. The vast majority of the characters depicted in the images collected were of the feminine nature, although this was most likely due to the skewed ratio of feminine/masculine thighs from the sources themselves and not due to any discrimination during the manual collecting. This is further discussed within limitations in Section~\ref{sec:limitations}. Image quality refers to the resolution of the picture. When finding duplicates, the one with higher resolution was kept. Some images where included in the dataset even if the quality of the resolution was below average due to either its content or source. -Image cropability refers to the composition of the picture. Since the focus of the first dataset in wAiFu is ``thighs'', it is preferred to isolate the thighs from other factors in the image which could influence the labeling, such as: faces, tits and other eye-catching details (some of the cropped images in the dataset does contain the ass region due to non-perfect but acceptable levels of cropability). +Image cropability refers to the composition of the picture. Since the focus of the first dataset in wAiFu is \emph{thighs}, it is preferred to isolate the thighs from other factors in the image which could influence the labeling, such as: faces, tits and other eye-catching details (some of the cropped images in the dataset does contain the ass region due to non-perfect but acceptable levels of cropability). -\subsection{Data Transformation} \label{sec:datatransformation} -The data transformation in this project consist of three stages after being collected: +\subsection{Data Preparation} \label{sec:dataprep} +The data preparation in this project consist of three stages after being collected: \begin{enumerate} \item Converting \item Renaming @@ -109,34 +108,42 @@ The images were then cropped to contain as little as possible apart from the top After cropping the original non-cropped images are kept with their original name, while the newly cropped images get an appended notation of having undergone the procedure (e.g., \textbf{thighs-0001-crop.png}). The cropped images were placed in a separate directory from the original images. By keeping both datasets, this study provides the possibility of utilizing the non-cropped images for future work. -The data transformation implementation is detailed in Section~\ref{sec:datatfms}. +The data preparation implementation is detailed in Section~\ref{sec:datatfms}. \subsection{Data Labeling} \label{sec:datalabeling} The labeling of datasets in wAiFu is categorised in two different methods: \begin{itemize} \item Boolean labeling - \item Score labeling + \item Rate labeling \end{itemize} The \emph{Boolean labeling} consist of two disjunctive values (e.g., True/False, Yes/No, Approved/Disapproved, 1/0) which is the closest to the reviews previously gotten when brokering pictures of anime thighs manually. An image would be sent and an Approved/Disapproved would be received in return. A diagram example is seen in Figure~\ref{fig:protocol}. -\begin{figure}[h] +\begin{figure}[t!] \includegraphics[width=.5\textwidth]{img/thighs_diagram.drawio.pdf} \caption{The protocol of reviewing thighs using boolean labeling} \label{fig:protocol} \end{figure} -The \emph{Score labeling} ranks the images on a scale (e.g., 0-10, 1-5, A-F). This could be considered to be a more advanced implementation of Boolean labeling (which would be viewed as a scale of 0-1) by adding float values in between. +The \emph{Rate labeling} ranks the images on a scale (e.g., 0-10, 1-5, A-F). This could be considered to be an extension of Boolean labeling (which would be seen as a scale of 0-1) by adding float values in between. The data labeling implementation is detailed in Section~\ref{sec:impl_labelapp} \subsection{fastai} \label{sec:fastai} -% Todo What is fastai -The AI implementation was using fastai, a deep learning library providing machine learning practitioners with high-level components creating state-of-the-art results in standard deep learning domains~\cite{fastai}. For the purpose of boolean labeling in this project, a single-label classification structure is implemented using various building blocks. The pictures and their labels are loaded into a \emph{DataLoaders} object. This object is responsible for maching labels with images, applying item transforms (transforms applied to each images individually) and batch transforms (transforms applied to each batch during training). It is also responsible of splitting the dataset into various parts: \emph{train, validation} and \emph{test}. +The AI implementation was using fastai, a deep learning library providing machine learning practitioners with high-level components creating state-of-the-art results in standard deep learning domains~\cite{fastai}. For the purpose of boolean labeling in this project, a single-label classification structure is implemented using various building blocks. The pictures and their labels are loaded into a \emph{DataLoaders} object. This object is responsible for maching labels with images, applying item transforms (transforms applied to each image individually) and batch transforms (transforms applied to each batch during training). It is also responsible of splitting the dataset into various sets: \emph{training, validation} and \emph{testing} (see Figure~\ref{fig:data_sets}). The training set is used to train a given model, which sees and learns from this data. The validation set is used to provide an unbiased evaluation of a model fit on the training dataset while tuning model hyperparameters. The evaluation becomes more biased as skill on the validation dataset is incorporated into the model configuration. Unlike the training set, the model only occasionally sees this data but never learns from it. The testing set is used to provide an unbiased evaluation of a \emph{final model fit} of the training dataset. +% Add something about how fastai splits the dataset using ImageDataLoader + +The DataLoaders object is then combined with a model and a metric to create a \emph{Learner} object. The model can be pre-trained, which means that some object and shape recognition can be used as a foundation to train a model for a more specific computer vision problem. This method is called \emph{transfer learning}. The Learner object has a bunch of methods including: \texttt{fine\_tune}, \texttt{predict} and \texttt{export}. The \texttt{fine\_tune} method first freezes all layers except the last one for one cycle (a ``prequel'' epoch), and then unfreezes all layers before running the epochs. This process of freezing and unfreezing layers in the Convolutional Neural Network improves the performance of transfer learning. So using \texttt{fine\_tune(2)} would first run a cycle only adjusting the last layer, then run 2 epochs adjusting all layers. The \texttt{predict} method is simply loading a single image into the model which then predicts the label. This is usually done after the training to sample the accuracy of the model. The \texttt{export} method saves the trained model to a file. + +\begin{figure} + \includegraphics[width=.5\textwidth]{img/data_sets.png} + \caption{Visualization of the three sets of data} + \label{fig:data_sets} +\end{figure} \section{Implementation} \label{sec:implementation} The code of all tools in Project Hentai AI is open source and can be found at \url{https://git.hentai-ai.org}. -\subsection{Data Transformations} \label{sec:datatfms} +\subsection{Data Preparation} \label{sec:datatfms} The following section goes through the implementation of homogenizing the dataset, including renaming, changing extensions and cropping the images. \subsubsection{Convert and Rename} @@ -200,6 +207,8 @@ The small dataset is due to the time-consuming task of manually cropping and lab \subsection{Future Work} \label{sec:futurework} In order to increase the size of the dataset and thereby obtaining a more robust accuracy from the machine learning model, future research in Project Hentai AI will spend some more focus on automating the collection, transformation and labeling of data. +In this study, only boolean labeling was considered when reviewing lewd anime thighs. But even in the world of Hentai thighs are more often than not in a gray-zone as opposed to black or white. A future work in wAiFu would be to extend the labeling application (\emph{Hentai Tinder}) to have a mode or a version capable of using rate labeling on a spectrum. This could be as easy as presenting the user with a 5-star system, similar to reviewing restaurants or hotels, where each image gets rated from 1-5. + \section{Conclusion} \section*{Acknowledgement}