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}}
+}
\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 }
\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.
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)
-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.
pdfTeX warning: pdflatex (file ./img/ai_diagram.pdf): PDF inclusion: found PDF
version <1.7>, but at most version <1.5> allowed
-<img/ai_diagram.pdf, id=101, 180.675pt x 188.6247pt>
+<img/ai_diagram.pdf, id=105, 180.675pt x 188.6247pt>
File: img/ai_diagram.pdf Graphic file (type pdf)
<use img/ai_diagram.pdf>
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
-<img/thighs_diagram.drawio.pdf, id=129, 578.16pt x 362.3136pt>
+<img/thighs_diagram.drawio.pdf, id=133, 578.16pt x 362.3136pt>
File: img/thighs_diagram.drawio.pdf Graphic file (type pdf)
<use img/thighs_diagram.drawio.pdf>
Package pdftex.def Info: img/thighs_diagram.drawio.pdf used on input line 123.
LaTeX Warning: `h' float specifier changed to `ht'.
-[2] (./wAiFu.bbl)
+[2]
+<img/no_batch_transform1.png, id=154, 640.64343pt x 264.99pt>
+File: img/no_batch_transform1.png Graphic file (type png)
+<use img/no_batch_transform1.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
+[][]
+ []
+
+<img/with_batch_transform2.png, id=156, 640.64343pt x 264.99pt>
+File: img/with_batch_transform2.png Graphic file (type png)
+<use img/with_batch_transform2.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
+[][]
+ []
+
+<img/with_vs_without_batch_transforms.png, id=157, 617.30624pt x 591.20876pt>
+File: img/with_vs_without_batch_transforms.png Graphic file (type png)
+<use img/with_vs_without_batch_transforms.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:
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
-dist/fonts/type1/urw/times/utmb8a.pfb></usr/share/texlive/texmf-dist/fonts/typ
e1/urw/times/utmbi8a.pfb></usr/share/texlive/texmf-dist/fonts/type1/urw/times/u
tmr8a.pfb></usr/share/texlive/texmf-dist/fonts/type1/urw/times/utmri8a.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)
\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
\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}.
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).
\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
\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}