From: Arcnilya Date: Thu, 17 Mar 2022 18:00:15 +0000 (+0100) Subject: paper update with images X-Git-Url: https://git.hentai-ai.org/?a=commitdiff_plain;h=70e0239d6c9a1648ae2bc720f3ca5f1de3e37ecc;p=papers%2FwAiFu.git%2F.git paper update with images --- diff --git a/img/loaded_images1.png b/img/loaded_images1.png new file mode 100644 index 0000000..6fb4e01 Binary files /dev/null and b/img/loaded_images1.png differ diff --git a/img/no_batch_transform1.png b/img/no_batch_transform1.png new file mode 100644 index 0000000..b12739a Binary files /dev/null and b/img/no_batch_transform1.png differ diff --git a/img/overfitting2.png b/img/overfitting2.png new file mode 100644 index 0000000..b1c0f03 Binary files /dev/null and b/img/overfitting2.png differ diff --git a/img/with_batch_transform1.png b/img/with_batch_transform1.png new file mode 100644 index 0000000..ee0c3bd Binary files /dev/null and b/img/with_batch_transform1.png differ diff --git a/img/with_batch_transform2.png b/img/with_batch_transform2.png new file mode 100644 index 0000000..3604386 Binary files /dev/null and b/img/with_batch_transform2.png differ diff --git a/img/with_vs_without_batch_transforms.png b/img/with_vs_without_batch_transforms.png new file mode 100644 index 0000000..039a002 Binary files /dev/null and b/img/with_vs_without_batch_transforms.png differ diff --git a/ref.bib b/ref.bib index 8c0bc95..47c3d98 100644 --- a/ref.bib +++ b/ref.bib @@ -34,4 +34,11 @@ author={Mitchell, Tom M and others}, year={1997}, publisher={McGraw-hill New York} -} \ No newline at end of file +} +@MISC{zoom-advanced, +author = {foobar167}, +title = {Github: zoom\_advanced.py}, +month = mar, +year = {2022}, +howpublished={\url{https://github.com/foobar167/junkyard/blob/master/zoom\_advanced.py}} +} diff --git a/wAiFu.aux b/wAiFu.aux index d25ab67..61168d5 100644 --- a/wAiFu.aux +++ b/wAiFu.aux @@ -43,30 +43,39 @@ \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}{}} -\@writefile{toc}{\contentsline {section}{\numberline {V}Implementation}{2}{section.5}\protected@file@percent } -\newlabel{sec:implementation}{{V}{2}{Implementation}{section.5}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {V-A}}Data Transformations}{2}{subsection.5.1}\protected@file@percent } -\newlabel{sec:datatfms}{{\mbox {V-A}}{2}{Data Transformations}{subsection.5.1}{}} +\citation{zoom-advanced} \bibdata{ref} -\bibcite{fastai}{1} -\bibcite{deeplearning}{2} -\bibcite{machinelearning}{3} -\bibstyle{plain} +\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{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}}Limitations}{3}{subsection.7.1}\protected@file@percent } -\newlabel{sec:limitations}{{\mbox {VII-A}}{3}{Limitations}{subsection.7.1}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {\mbox {VII-B}}Future Work}{3}{subsection.7.2}\protected@file@percent } -\newlabel{sec:futurework}{{\mbox {VII-B}}{3}{Future Work}{subsection.7.2}{}} +\@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 } -\@writefile{toc}{\contentsline {section}{References}{3}{section*.2}\protected@file@percent } +\bibcite{machinelearning}{4} +\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{toc}{\contentsline {section}{References}{4}{section*.2}\protected@file@percent } diff --git a/wAiFu.bbl b/wAiFu.bbl index 00b3caa..40e1920 100644 --- a/wAiFu.bbl +++ b/wAiFu.bbl @@ -1,5 +1,12 @@ \begin{thebibliography}{1} +\bibitem{zoom-advanced} +foobar167. +\newblock Github: zoom\_advanced.py. +\newblock + \url{https://github.com/foobar167/junkyard/blob/master/zoom\_advanced.py}, + March 2022. + \bibitem{fastai} Jeremy Howard and Sylvain Gugger. \newblock Fastai: {A} layered {API} for deep learning. diff --git a/wAiFu.blg b/wAiFu.blg index 2186c5e..2b2810e 100644 --- a/wAiFu.blg +++ b/wAiFu.blg @@ -1,48 +1,48 @@ This is BibTeX, Version 0.99d (TeX Live 2019/Debian) Capacity: max_strings=200000, hash_size=200000, hash_prime=170003 -The top-level auxiliary file: main.aux +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 3 entries, +You've used 4 entries, 2118 wiz_defined-function locations, - 517 strings with 4258 characters, -and the built_in function-call counts, 904 in all, are: -= -- 86 -> -- 44 + 522 strings with 4384 characters, +and the built_in function-call counts, 1114 in all, are: += -- 106 +> -- 51 < -- 0 -+ -- 17 -- -- 14 -* -- 65 -:= -- 164 -add.period$ -- 9 -call.type$ -- 3 -change.case$ -- 15 ++ -- 20 +- -- 16 +* -- 73 +:= -- 199 +add.period$ -- 12 +call.type$ -- 4 +change.case$ -- 19 chr.to.int$ -- 0 -cite$ -- 4 -duplicate$ -- 32 -empty$ -- 68 -format.name$ -- 14 -if$ -- 179 +cite$ -- 5 +duplicate$ -- 39 +empty$ -- 90 +format.name$ -- 16 +if$ -- 225 int.to.chr$ -- 0 -int.to.str$ -- 3 +int.to.str$ -- 4 missing$ -- 3 -newline$ -- 18 -num.names$ -- 6 -pop$ -- 13 +newline$ -- 23 +num.names$ -- 8 +pop$ -- 21 preamble$ -- 1 -purify$ -- 12 +purify$ -- 15 quote$ -- 0 -skip$ -- 24 +skip$ -- 31 stack$ -- 0 -substring$ -- 49 -swap$ -- 2 +substring$ -- 54 +swap$ -- 3 text.length$ -- 0 text.prefix$ -- 0 top$ -- 0 -type$ -- 12 +type$ -- 16 warning$ -- 1 -while$ -- 9 -width$ -- 4 -write$ -- 33 +while$ -- 11 +width$ -- 5 +write$ -- 43 (There was 1 warning) diff --git a/wAiFu.log b/wAiFu.log index 252ca0b..4693292 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) 15 MAR 2022 16:50 +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 entering extended mode restricted \write18 enabled. %&-line parsing enabled. @@ -442,7 +442,7 @@ File: umsb.fd 2013/01/14 v3.01 AMS symbols B pdfTeX warning: pdflatex (file ./img/ai_diagram.pdf): PDF inclusion: found PDF version <1.7>, but at most version <1.5> allowed - + File: img/ai_diagram.pdf Graphic file (type pdf) Package pdftex.def Info: img/ai_diagram.pdf used on input line 53. @@ -454,7 +454,7 @@ 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. @@ -468,7 +468,41 @@ Overfull \hbox (6.0pt too wide) in paragraph at lines 123--124 LaTeX Warning: `h' float specifier changed to `ht'. -[2] (./wAiFu.bbl) +[2] + +File: img/no_batch_transform1.png Graphic file (type png) + +Package pdftex.def Info: img/no_batch_transform1.png used on input line 178. +(pdftex.def) Requested size: 258.0pt x 106.71788pt. + +Overfull \hbox (12.79999pt too wide) in paragraph at lines 178--179 +[][] + [] + + +File: img/with_batch_transform2.png Graphic file (type png) + +Package pdftex.def Info: img/with_batch_transform2.png used on input line 184. + +(pdftex.def) Requested size: 258.0pt x 106.71788pt. + +Overfull \hbox (12.79999pt too wide) in paragraph at lines 184--185 +[][] + [] + + +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. +(pdftex.def) Requested size: 258.0pt x 247.09715pt. + +Overfull \hbox (6.0pt too wide) in paragraph at lines 190--191 +[][] + [] + +(./wAiFu.bbl [3 <./img/thighs_diagram.drawio.pdf> <./img/no_batch_transform1.pn +g> <./img/with_batch_transform2.png>]) ** Conference Paper ** Before submitting the final camera ready copy, remember to: @@ -480,21 +514,27 @@ 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 189. -[3 <./img/thighs_diagram.drawio.pdf>] -Package atveryend Info: Empty hook `AfterLastShipout' on input line 189. +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. (./wAiFu.aux) -Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 189. -Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 189. +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 211. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 211. Package rerunfilecheck Info: File `wAiFu.out' has not changed. -(rerunfilecheck) Checksum: 92333D33687D0EFA01540CF1BE0EBC48;1359. -Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 189. +(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. ) Here is how much of TeX's memory you used: - 7769 strings out of 483183 - 117171 string characters out of 5966291 - 384544 words of memory out of 5000000 - 22611 multiletter control sequences out of 15000+600000 + 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 14 hyphenation exceptions out of 8191 34i,11n,37p,877b,455s stack positions out of 5000i,500n,10000p,200000b,80000s @@ -503,10 +543,10 @@ e/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.pfb> -Output written on wAiFu.pdf (3 pages, 527373 bytes). +Output written on wAiFu.pdf (4 pages, 1281908 bytes). PDF statistics: - 198 PDF objects out of 1000 (max. 8388607) - 173 compressed objects within 2 object streams - 39 named destinations out of 1000 (max. 500000) - 195 words of extra memory for PDF output out of 10000 (max. 10000000) + 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) diff --git a/wAiFu.out b/wAiFu.out index 89a5c15..e587b03 100644 --- a/wAiFu.out +++ b/wAiFu.out @@ -17,7 +17,8 @@ \BOOKMARK [2][-]{subsection.5.3}{Deep Learning with fastai}{section.5}% 17 \BOOKMARK [1][-]{section.6}{Results}{}% 18 \BOOKMARK [1][-]{section.7}{Discussion}{}% 19 -\BOOKMARK [2][-]{subsection.7.1}{Limitations}{section.7}% 20 -\BOOKMARK [2][-]{subsection.7.2}{Future Work}{section.7}% 21 -\BOOKMARK [1][-]{section.8}{Conclusion}{}% 22 -\BOOKMARK [1][-]{section*.2}{References}{}% 23 +\BOOKMARK [2][-]{subsection.7.1}{Transforms}{section.7}% 20 +\BOOKMARK [2][-]{subsection.7.2}{Limitations}{section.7}% 21 +\BOOKMARK [2][-]{subsection.7.3}{Future Work}{section.7}% 22 +\BOOKMARK [1][-]{section.8}{Conclusion}{}% 23 +\BOOKMARK [1][-]{section*.2}{References}{}% 24 diff --git a/wAiFu.pdf b/wAiFu.pdf index 888b6e7..ac60882 100644 Binary files a/wAiFu.pdf and b/wAiFu.pdf differ diff --git a/wAiFu.tex b/wAiFu.tex index b45b0eb..6cf5c63 100644 --- a/wAiFu.tex +++ b/wAiFu.tex @@ -131,7 +131,7 @@ 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 layered API for deep learning~\cite{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}. \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}. @@ -144,9 +144,10 @@ The following section goes through the implementation of homogenizing the datase Talk about the script for making the dataset homogeneous. \subsubsection{Cropping Images} -The application for efficiently cropping the images manually was built ontop of a zooming-application which utilizes tiles for increased performance. The frame border of the application window was set to a 1:1 aspect ratio with desired dimensions and could then easily be used to crop every image from a specified input directory, and put the cropped images in a separate (or in the same) destination directory. +The application for efficiently cropping the images manually was built ontop of a zooming-application~\cite{zoom-advanced} which utilizes tiles for increased performance. The frame border of the application window was set to a 1:1 aspect ratio with desired dimensions and could then easily be used to crop every image from a specified input directory, and put the cropped images in a separate (or in the same) destination directory. % Add git link % Add screenshot +The code is open source and can be found at: \url{https://git.hentai-ai.org/?p=hentai-cropper.git/.git} \subsection{Label App: Hentai Tinder} \label{sec:impl_labelapp} The name of the label application is ``Hentai Tinder''\\(cred. Hood Classic\#8866). @@ -160,6 +161,7 @@ The name of the label application is ``Hentai Tinder''\\(cred. Hood Classic\#886 \end{itemize} The output of the Hentai Tinder application is a csv file which can be easily used in fastai to create a dataloader with all the images including their labels. % Include the head of a sample csv file +The code is open source and can be found at: \url{https://git.hentai-ai.org/?p=hentai-tinder.git/.git} \subsection{Deep Learning with fastai} \label{sec:impl_deeplearning} % How was fastai implemented @@ -168,15 +170,35 @@ The output of the Hentai Tinder application is a csv file which can be easily us \section{Results} \label{sec:results} % Two more csv files % Cool graphs of AI performance +% Compare with/-out transforms, graph of train_loss, valid_loss and error_rate for 15 epochs \section{Discussion} \label{sec:discussion} +\subsection{Transforms} +\begin{figure} + \fbox{\includegraphics[width=.5\textwidth]{img/no_batch_transform1.png}} + \caption{Training image without batch transforms} + \label{fig:wobt} +\end{figure} + +\begin{figure} + \fbox{\includegraphics[width=.5\textwidth]{img/with_batch_transform2.png}} + \caption{Training image with batch transforms} + \label{fig:wbt} +\end{figure} + +\begin{figure} + \includegraphics[width=.5\textwidth]{img/with_vs_without_batch_transforms.png} + \caption{Comparing with and without batch transforms on error\_rate, train\_loss and valid\_loss} + \label{fig:btgraph} +\end{figure} \subsection{Limitations} \label{sec:limitations} The size of the lewd anime thighs dataset is only 1000 images. -The small dataset is due to the time-consuming task of manually crop and label the dataset. +This leads to overfitting which can be mitigated by applying transformations +The small dataset is due to the time-consuming task of manually cropping and labeling the dataset. Since the model is trying to learn an individual's taste, that individual must label the full dataset. \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 give more thought to the collection, transformation and labeling of data. +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. \section{Conclusion}