diff --git a/.gitattributes b/.gitattributes
index a6344aac8c09253b3b630fb776ae94478aa0275b..e7581942f689b3d3e721d8dcae199ff4b079d1e8 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,35 +1,231 @@
-*.7z filter=lfs diff=lfs merge=lfs -text
-*.arrow filter=lfs diff=lfs merge=lfs -text
-*.bin filter=lfs diff=lfs merge=lfs -text
-*.bz2 filter=lfs diff=lfs merge=lfs -text
-*.ckpt filter=lfs diff=lfs merge=lfs -text
-*.ftz filter=lfs diff=lfs merge=lfs -text
-*.gz filter=lfs diff=lfs merge=lfs -text
-*.h5 filter=lfs diff=lfs merge=lfs -text
-*.joblib filter=lfs diff=lfs merge=lfs -text
-*.lfs.* filter=lfs diff=lfs merge=lfs -text
-*.mlmodel filter=lfs diff=lfs merge=lfs -text
-*.model filter=lfs diff=lfs merge=lfs -text
-*.msgpack filter=lfs diff=lfs merge=lfs -text
-*.npy filter=lfs diff=lfs merge=lfs -text
-*.npz filter=lfs diff=lfs merge=lfs -text
-*.onnx filter=lfs diff=lfs merge=lfs -text
-*.ot filter=lfs diff=lfs merge=lfs -text
-*.parquet filter=lfs diff=lfs merge=lfs -text
-*.pb filter=lfs diff=lfs merge=lfs -text
-*.pickle filter=lfs diff=lfs merge=lfs -text
-*.pkl filter=lfs diff=lfs merge=lfs -text
-*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
-*.rar filter=lfs diff=lfs merge=lfs -text
-*.safetensors filter=lfs diff=lfs merge=lfs -text
-saved_model/**/* filter=lfs diff=lfs merge=lfs -text
-*.tar.* filter=lfs diff=lfs merge=lfs -text
-*.tar filter=lfs diff=lfs merge=lfs -text
-*.tflite filter=lfs diff=lfs merge=lfs -text
-*.tgz filter=lfs diff=lfs merge=lfs -text
-*.wasm filter=lfs diff=lfs merge=lfs -text
-*.xz filter=lfs diff=lfs merge=lfs -text
-*.zip filter=lfs diff=lfs merge=lfs -text
-*.zst filter=lfs diff=lfs merge=lfs -text
-*tfevents* filter=lfs diff=lfs merge=lfs -text
+dataset1/F--DvrzacAEhutq.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/F-FBTF2agAAzg8H.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/F-Kait-bUAA4-QI.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/F-j9uULbEAAnCJN.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/F415ufeaoAA0o1S.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/F415ufnbMAAuQOs.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/F89Bc9dawAA5Vlx.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/F92caRWagAA5VaW.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/F92lVehbsAACADq.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/F98gge7asAADugl.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FD6D3AA584B393E4A55591427142AEDD.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FEzHC7CVcAYv_GZ.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FFO4s5IVEAMiBDk.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FFwwrZYVkAAQPQM.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FGohLfCVEAEtYqV.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FH-rpMTWUAEhMtb.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FJNOY_4aMAAPz6j.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FK3joP1UcAAiqaS.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FKhZhmvaAAA42Xw.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FKwG4YGaUAQuBhz.png filter=lfs diff=lfs merge=lfs -text
+dataset1/FaA6jYdXgAEUhbC.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FaQa7v-aMAEksWG.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FahocS8VQAArokM.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FahocTEUUAI59uL.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FahocTIUYAAC_6d.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FbPmqIdacAAuhsa.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FcNBKs_acAAdbo_.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FcNdYeHakAMNLDL.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/Fcx5wppaMAc_jjA.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FdoReOraIAErEoN.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/Fe3YAAXUoAApm-c.png filter=lfs diff=lfs merge=lfs -text
+dataset1/Ff6QQsgUoAACRmz.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FfaoRB2aYAMuNRy.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/Fh-VsdYaEAAzz8j.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FhLMi19XEAAluLj.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FhP6Z9AUoAA589v.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/FhRQoruUoAAP01r.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/Fi3Xl3BUYAEQODZ.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQHCTV2boAA7exI.png filter=lfs diff=lfs merge=lfs -text
+dataset1/GQHdSY1bcAA6yFk.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQL6xwPagAAhACE.png filter=lfs diff=lfs merge=lfs -text
+dataset1/GQLwtIEaIAA4qDs.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQQd0NHbMAAR8iA.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQQd0NKaUAAWLJF.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQVPH-2bkAALrxT.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQWAfGgbUAA06WB.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQmj-cCaAAAD2z6.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQnO89ZakAAbEKj.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQovMnlakAAqvkY.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQowaszakAANNG4.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQr70ECaoAA55ns.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQr70EDaEAAIwko.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQrL_p4aoAAAkPS.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQrL_p4bkAAg5-5.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQrO9HcbcAA93El.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQsVgQrasAAACy7.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQsYL08aQAAkEKQ.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GQzpIFfbkAAfWd7.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GR-5HVqbAAAfjOG.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GR-5UDGaMAcodkX.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GR-5UptaMAMZehr.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GRF9Z5iaIAAco8h.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GRFJ9huaYAAwKYn.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GRFW1vybEAANkXM.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GRFW1vzaMAAsoF0.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GRIpKS9bUAAFqf5.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GRK9SEobsAA1-zE.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GRaWilMa4AAiRXt.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GRjk9SdbMAA7raK.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GRkC4pGbMAAhh93.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GRketotaIAA7wmP.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GRketoxaYAAp8nv.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVHZuDaaQAAdr5U.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVIHTy2aEAMb04n.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVII87raEAMIEpU.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVISU10aEAAxcFl.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVISU10aEAQa-L3.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVISU1zaEAYE8UE.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVISU1zbsAAivBr.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVJ_s7GaEAMeQ1q.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVKsrCwbwAACV2o.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVKtsl8aEAExpW6.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVKu__saEAEwEL0.png filter=lfs diff=lfs merge=lfs -text
+dataset1/GVL3b3ybAAA1sw9.png filter=lfs diff=lfs merge=lfs -text
+dataset1/GVLfJTzaQAAyqUN.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVMRSfSaQAAGsWr.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVNMBpTacAEk-sq.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVPGfQ5a0AAI4kr.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVPkZjYagAAr7b8.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVQ4_coa0AAVeU3.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVQ7m6na4AAe2to.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVQZvaCa0AAWhUU.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVRg_-3akAAr4Qn.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVUTBxjagAATzSg.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVUTBxkaIAAHfoo.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVUeZmZbgAAa7WV.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVUmXG5aAAAI5mj.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVUxwGcagAA_CrY.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVWDChVaAAEtIsE.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVZ2LnyaMAQ2O1c.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVlsrAybgAc5Egl.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVltsJGbMAA95m8.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVm90eaaAAAaeEZ.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVmYBldbgAETp4o.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVmYKfZbgAApil_.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVpRMq-XQAAHaiX.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVphWn9bgAEnuGP.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVqMWwdXQAAIbUX.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVqMXWubQAAy8iO.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVqP6xkbwAAMbex.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVuiaXua8AggvT9.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVwPJttbMAA0teL.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GVyhF8sWEAA6kDP.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GW1P-CBXQAIOW7y.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GW2O8aFa8AEMUZ7.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GW2OTC_aUAAmmhf.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GW7PejFbYAAsXXK.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GW8KrLfbcAAsG42.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GW8kLr2bcAASJsg.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GW8tHQBa0AAImgY.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWDw1CmaEAAnRN4.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWOTiNMaMAALMvd.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWSoLEdacAAdPMP.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWWwEdcaQAAs_nn.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWZJO5NasAAhdDQ.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GW_ctsYbMAAPpTg.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWbg112bEAAvrI5.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWd-hXuboAArvmT.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWdgFREbkAAb0qX.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWfpZDjbIAAfQs9.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWiKRPgbgAA3kgY.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWmkWu9bMAAYmHq.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWoH5ylakAArz-n.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWpBf6xXgAAIwOr.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWsMmxya8AMTFdu.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWvVC1BWkAAbeE5.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWw0pnda8AELzGp.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWwmjv4a8AEmrKA.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GWy_vLLbAAA1Szc.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GX0CvuNakAAhyoV.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GX0RmBwa4AAI3EQ.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GX1IdYyaoAAxdQs.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GX6KlH6awAAwkjO.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GX6R81GawAAqWa_.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GXCG440aIAAw8zf.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GXJ6hTSbwAAiqWm.png filter=lfs diff=lfs merge=lfs -text
+dataset1/GXRcTS6bUAAajnm.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GXRcY59bAAA294X.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GXSiPEFa8AABK1q.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GXT04A1bgAA5jYL.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GXT1CcnbgAEYnp6.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GXWR8U4awAAy6gT.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GXWebOLa0AAfTMa.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GX_9Leob0AMqHgM.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GX_Rxoxb0AEfw9P.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GXbqoXsbwAAgZ36.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GY-AHlibAAExUwc.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GY-bGyRbAAIGewv.png filter=lfs diff=lfs merge=lfs -text
+dataset1/GY2ZWwnacAESNXD.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GY4bMOAaIAAm_-H.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GY4r1ygbEAAIUWM.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GY7KCPbaUAAZ8nL.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GY90wPHaMAEwFR5.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GY9ZxlkaIAAkXHf.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GYDJ9YGb0AE_AmL.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GYEvYPjb0AEHtdL.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GYJcAYnbMAAK4FR.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GYKtxTkacAA3HWW.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GYMmRw9akAAKtH9.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GYd_zFAa0AAk8sM.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GYjugDvasAESsu3.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GYoBIXtbYAAsTDz.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GYpsFLPaMAAOK2d.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GYtbLkTaIAAeYr7.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GYyjLlrbUAAaKYk.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GYzM5OdbQAEnhLm.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZ60z3Yb0AINYLa.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZ6QcXKb0AIkRB3.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZ7sIobb0AMxVei.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZBjQ-SbAAEmqYp.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZGfTkGaEAA1_nO.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZGlkBfbkAAAMpy.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZGyDm6aIAAyloF.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZGz7ruaQAADD2P.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZH77sgaQAAD4x1.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZIRy9Aa0AA8jgW.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZKGBItbwAAG8fw.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZKHj7NaQAA4DLq.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZKtOq4bsAAKNzf.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZKyag8XgAAA_S-.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZKyag8XgAEJnKw.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZLpz7Db0AAbx30.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZMsWhEaAAAnGT9.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZOmFova4AA8FaL.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZPadOSaoAAqfo6.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZSKZ1SbIAAqsAx.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZWn_aLasAA26sM.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZY2K8QaMAAK9Ys.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZb8rr0aAAA5Mvk.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZdjqWlbcAAqSAP.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZdjqkya8AAAP9g.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZhGwhNa4AA9PhX.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZi9tkyaAAE4pKK.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZlGO6dasAAxYVr.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZmv0gQakAAB6s7.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZmv3wSb0AEOrN7.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZmv5xKawAEqrb0.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZmvyHVaYAEet_v.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZn5gLWbsAAWxW2.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZq-Ss2b0AAEByd.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZw-_6RaAAQMVv6.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZx9nd0aYAAh0rO.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZyGkbvbkAIPzNS.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/GZyW0KMa0AAOj1C.png filter=lfs diff=lfs merge=lfs -text
+dataset1/Hozumi_leader.webp filter=lfs diff=lfs merge=lfs -text
+dataset1/Hozumi_lose.webp filter=lfs diff=lfs merge=lfs -text
+dataset1/Ichinose.Asuna.full.3912797.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/f22605797c89aa0aa7748e6591cae0931841784.png filter=lfs diff=lfs merge=lfs -text
+dataset1/f616d60cabc65cb6cd414421193a44e4251799.png filter=lfs diff=lfs merge=lfs -text
+dataset1/f7488d4ecda1947809f6ede30a4d76cd.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/fd0c8ce91178e5b1ff12a4623caa7dd9360195221.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/fkOTGiYdaIEetVXAj68MVpl5.jpeg filter=lfs diff=lfs merge=lfs -text
+dataset1/h6v44095z4.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/htq3bssb09.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/https___ugc-media.4gamers.com.tw_puku-prod-zh_anonymous-story_8cf1c10d-f286-41cf-bb21-5fcd5fdf8a8d.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/i16412848906.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/i16485506310.jpg filter=lfs diff=lfs merge=lfs -text
+dataset1/ibqlid61o5.jpg filter=lfs diff=lfs merge=lfs -text
+output/train_results/test1/images/0.jpg filter=lfs diff=lfs merge=lfs -text
+output/train_results/test1/images/rec_0.jpg filter=lfs diff=lfs merge=lfs -text
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..ea360f8682d69ab50d5b03f4314e4873d74a1d60
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,140 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+cover/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+.pybuilder/
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+# For a library or package, you might want to ignore these files since the code is
+# intended to run in multiple environments; otherwise, check them in:
+.python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
+# pytype static type analyzer
+.pytype/
+
+# Cython debug symbols
+cython_debug/
+storage/*
+train_results/*
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..f288702d2fa16d3cdf0035b15a9fcbc552cd88e7
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..4efce95c1207282f91235b1b5ffba588027aa935
--- /dev/null
+++ b/README.md
@@ -0,0 +1,63 @@
+# A Fast and Stable GAN for Small and High Resolution Imagesets - pytorch
+The official pytorch implementation of the paper "Towards Faster and Stabilized GAN Training for High-fidelity Few-shot Image Synthesis", the paper can be found [here](https://arxiv.org/abs/2101.04775).
+
+## 0. Data
+The datasets used in the paper can be found at [link](https://drive.google.com/file/d/1aAJCZbXNHyraJ6Mi13dSbe7pTyfPXha0/view?usp=sharing).
+
+After testing on over 20 datasets with each has less than 100 images, this GAN converges on 80% of them.
+I still cannot summarize an obvious pattern of the "good properties" for a dataset which this GAN can converge on, please feel free to try with your own datasets.
+
+
+## 1. Description
+The code is structured as follows:
+* models.py: all the models' structure definition.
+
+* operation.py: the helper functions and data loading methods during training.
+
+* train.py: the main entry of the code, execute this file to train the model, the intermediate results and checkpoints will be automatically saved periodically into a folder "train_results".
+
+* eval.py: generates images from a trained generator into a folder, which can be used to calculate FID score.
+
+* benchmarking: the functions we used to compute FID are located here, it automatically downloads the pytorch official inception model.
+
+* lpips: this folder contains the code to compute the LPIPS score, the inception model is also automatically download from official location.
+
+* scripts: this folder contains many scripts you can use to play around the trained model. Including:
+ 1. style_mix.py: style-mixing as introduced in the paper;
+ 2. generate_video.py: generating a continuous video from the interpolation of generated images;
+ 3. find_nearest_neighbor.py: given a generated image, find the closest real-image from the training set;
+ 4. train_backtracking_one.py: given a real-image, find the latent vector of this image from a trained Generator.
+
+## 2. How to run
+Place all your training images in a folder, and simply call
+```
+python train.py --path /path/to/RGB-image-folder --output_path /path/to/the/output
+```
+You can also see all the training options by:
+```
+python train.py --help
+```
+The code will automatically create a new folder (you have to specify the name of the folder using --name option) to store the trained checkpoints and intermediate synthesis results.
+
+Once finish training, you can generate 100 images (or as many as you want) by:
+```
+cd ./train_results/name_of_your_training/
+python eval.py --n_sample 100
+```
+
+## 3. Pre-trained models
+The pre-trained models and the respective code of each model are shared [here](https://drive.google.com/drive/folders/1nCpr84nKkrs9-aVMET5h8gqFbUYJRPLR?usp=sharing).
+
+You can also use FastGAN to generate images with a pre-packaged Docker image, hosted on the Replicate registry: https://beta.replicate.ai/odegeasslbc/FastGAN
+
+## 4. Important notes
+1. The provided code is for research use only.
+2. Different model and training configurations are needed on different datasets. You may have to tune the hyper-parameters to get the best results on your own datasets.
+
+ 2.1. The hyper-parameters includes: the augmentation options, the model depth (how many layers), the model width (channel numbers of each layer). To change these, you have to change the code in models.py and train.py directly.
+
+ 2.2. Please check the code in the shared pre-trained models on how each of them are configured differently on different datasets. Especially, compare the models.py for ffhq and art datasets, you will get an idea on what chages could be made on different datasets.
+
+## 5. Other notes
+1. The provided scripts are not well organized, contributions are welcomed to clean them.
+2. An third-party implementation of this paper can be found [here](https://github.com/lucidrains/lightweight-gan), where some other techniques are included. I suggest you try both implementation if you find one of them does not work.
diff --git a/benchmarking/benchmark.py b/benchmarking/benchmark.py
new file mode 100644
index 0000000000000000000000000000000000000000..1f52f29675088649aeaec7f63de67aefbc0f63ea
--- /dev/null
+++ b/benchmarking/benchmark.py
@@ -0,0 +1,579 @@
+import torch
+import torch.nn as nn
+import torch.nn.functional as F
+from torchvision import models
+from torchvision.models import inception_v3, Inception3
+from torchvision.utils import save_image
+
+try:
+ from torchvision.models.utils import load_state_dict_from_url
+except ImportError:
+ from torch.utils.model_zoo import load_url as load_state_dict_from_url
+
+import numpy as np
+from scipy import linalg
+from tqdm import tqdm
+import pickle
+import os
+
+# Inception weights ported to Pytorch from
+# http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz
+FID_WEIGHTS_URL = 'https://github.com/mseitzer/pytorch-fid/releases/download/fid_weights/pt_inception-2015-12-05-6726825d.pth'
+
+
+class InceptionV3(nn.Module):
+ """Pretrained InceptionV3 network returning feature maps"""
+
+ # Index of default block of inception to return,
+ # corresponds to output of final average pooling
+ DEFAULT_BLOCK_INDEX = 3
+
+ # Maps feature dimensionality to their output blocks indices
+ BLOCK_INDEX_BY_DIM = {
+ 64: 0, # First max pooling features
+ 192: 1, # Second max pooling featurs
+ 768: 2, # Pre-aux classifier features
+ 2048: 3 # Final average pooling features
+ }
+
+ def __init__(self,
+ output_blocks=[DEFAULT_BLOCK_INDEX],
+ resize_input=True,
+ normalize_input=True,
+ requires_grad=False,
+ use_fid_inception=True):
+ """Build pretrained InceptionV3
+ Parameters
+ ----------
+ output_blocks : list of int
+ Indices of blocks to return features of. Possible values are:
+ - 0: corresponds to output of first max pooling
+ - 1: corresponds to output of second max pooling
+ - 2: corresponds to output which is fed to aux classifier
+ - 3: corresponds to output of final average pooling
+ resize_input : bool
+ If true, bilinearly resizes input to width and height 299 before
+ feeding input to model. As the network without fully connected
+ layers is fully convolutional, it should be able to handle inputs
+ of arbitrary size, so resizing might not be strictly needed
+ normalize_input : bool
+ If true, scales the input from range (0, 1) to the range the
+ pretrained Inception network expects, namely (-1, 1)
+ requires_grad : bool
+ If true, parameters of the model require gradients. Possibly useful
+ for finetuning the network
+ use_fid_inception : bool
+ If true, uses the pretrained Inception model used in Tensorflow's
+ FID implementation. If false, uses the pretrained Inception model
+ available in torchvision. The FID Inception model has different
+ weights and a slightly different structure from torchvision's
+ Inception model. If you want to compute FID scores, you are
+ strongly advised to set this parameter to true to get comparable
+ results.
+ """
+ super(InceptionV3, self).__init__()
+
+ self.resize_input = resize_input
+ self.normalize_input = normalize_input
+ self.output_blocks = sorted(output_blocks)
+ self.last_needed_block = max(output_blocks)
+
+ assert self.last_needed_block <= 3, \
+ 'Last possible output block index is 3'
+
+ self.blocks = nn.ModuleList()
+
+ if use_fid_inception:
+ inception = fid_inception_v3()
+ else:
+ inception = models.inception_v3(pretrained=True)
+
+ # Block 0: input to maxpool1
+ block0 = [
+ inception.Conv2d_1a_3x3,
+ inception.Conv2d_2a_3x3,
+ inception.Conv2d_2b_3x3,
+ nn.MaxPool2d(kernel_size=3, stride=2)
+ ]
+ self.blocks.append(nn.Sequential(*block0))
+
+ # Block 1: maxpool1 to maxpool2
+ if self.last_needed_block >= 1:
+ block1 = [
+ inception.Conv2d_3b_1x1,
+ inception.Conv2d_4a_3x3,
+ nn.MaxPool2d(kernel_size=3, stride=2)
+ ]
+ self.blocks.append(nn.Sequential(*block1))
+
+ # Block 2: maxpool2 to aux classifier
+ if self.last_needed_block >= 2:
+ block2 = [
+ inception.Mixed_5b,
+ inception.Mixed_5c,
+ inception.Mixed_5d,
+ inception.Mixed_6a,
+ inception.Mixed_6b,
+ inception.Mixed_6c,
+ inception.Mixed_6d,
+ inception.Mixed_6e,
+ ]
+ self.blocks.append(nn.Sequential(*block2))
+
+ # Block 3: aux classifier to final avgpool
+ if self.last_needed_block >= 3:
+ block3 = [
+ inception.Mixed_7a,
+ inception.Mixed_7b,
+ inception.Mixed_7c,
+ nn.AdaptiveAvgPool2d(output_size=(1, 1))
+ ]
+ self.blocks.append(nn.Sequential(*block3))
+
+ for param in self.parameters():
+ param.requires_grad = requires_grad
+
+ def forward(self, inp):
+ """Get Inception feature maps
+ Parameters
+ ----------
+ inp : torch.autograd.Variable
+ Input tensor of shape Bx3xHxW. Values are expected to be in
+ range (0, 1)
+ Returns
+ -------
+ List of torch.autograd.Variable, corresponding to the selected output
+ block, sorted ascending by index
+ """
+ outp = []
+ x = inp
+
+ if self.resize_input:
+ x = F.interpolate(x,
+ size=(299, 299),
+ mode='bilinear',
+ align_corners=False)
+
+ if self.normalize_input:
+ x = 2 * x - 1 # Scale from range (0, 1) to range (-1, 1)
+
+ for idx, block in enumerate(self.blocks):
+ x = block(x)
+ if idx in self.output_blocks:
+ outp.append(x)
+
+ if idx == self.last_needed_block:
+ break
+
+ return outp
+
+
+def fid_inception_v3():
+ """Build pretrained Inception model for FID computation
+ The Inception model for FID computation uses a different set of weights
+ and has a slightly different structure than torchvision's Inception.
+ This method first constructs torchvision's Inception and then patches the
+ necessary parts that are different in the FID Inception model.
+ """
+ inception = models.inception_v3(num_classes=1008,
+ aux_logits=False,
+ pretrained=False)
+ inception.Mixed_5b = FIDInceptionA(192, pool_features=32)
+ inception.Mixed_5c = FIDInceptionA(256, pool_features=64)
+ inception.Mixed_5d = FIDInceptionA(288, pool_features=64)
+ inception.Mixed_6b = FIDInceptionC(768, channels_7x7=128)
+ inception.Mixed_6c = FIDInceptionC(768, channels_7x7=160)
+ inception.Mixed_6d = FIDInceptionC(768, channels_7x7=160)
+ inception.Mixed_6e = FIDInceptionC(768, channels_7x7=192)
+ inception.Mixed_7b = FIDInceptionE_1(1280)
+ inception.Mixed_7c = FIDInceptionE_2(2048)
+
+ state_dict = load_state_dict_from_url(FID_WEIGHTS_URL, progress=True)
+ inception.load_state_dict(state_dict)
+ return inception
+
+
+class FIDInceptionA(models.inception.InceptionA):
+ """InceptionA block patched for FID computation"""
+ def __init__(self, in_channels, pool_features):
+ super(FIDInceptionA, self).__init__(in_channels, pool_features)
+
+ def forward(self, x):
+ branch1x1 = self.branch1x1(x)
+
+ branch5x5 = self.branch5x5_1(x)
+ branch5x5 = self.branch5x5_2(branch5x5)
+
+ branch3x3dbl = self.branch3x3dbl_1(x)
+ branch3x3dbl = self.branch3x3dbl_2(branch3x3dbl)
+ branch3x3dbl = self.branch3x3dbl_3(branch3x3dbl)
+
+ # Patch: Tensorflow's average pool does not use the padded zero's in
+ # its average calculation
+ branch_pool = F.avg_pool2d(x, kernel_size=3, stride=1, padding=1,
+ count_include_pad=False)
+ branch_pool = self.branch_pool(branch_pool)
+
+ outputs = [branch1x1, branch5x5, branch3x3dbl, branch_pool]
+ return torch.cat(outputs, 1)
+
+
+class FIDInceptionC(models.inception.InceptionC):
+ """InceptionC block patched for FID computation"""
+ def __init__(self, in_channels, channels_7x7):
+ super(FIDInceptionC, self).__init__(in_channels, channels_7x7)
+
+ def forward(self, x):
+ branch1x1 = self.branch1x1(x)
+
+ branch7x7 = self.branch7x7_1(x)
+ branch7x7 = self.branch7x7_2(branch7x7)
+ branch7x7 = self.branch7x7_3(branch7x7)
+
+ branch7x7dbl = self.branch7x7dbl_1(x)
+ branch7x7dbl = self.branch7x7dbl_2(branch7x7dbl)
+ branch7x7dbl = self.branch7x7dbl_3(branch7x7dbl)
+ branch7x7dbl = self.branch7x7dbl_4(branch7x7dbl)
+ branch7x7dbl = self.branch7x7dbl_5(branch7x7dbl)
+
+ # Patch: Tensorflow's average pool does not use the padded zero's in
+ # its average calculation
+ branch_pool = F.avg_pool2d(x, kernel_size=3, stride=1, padding=1,
+ count_include_pad=False)
+ branch_pool = self.branch_pool(branch_pool)
+
+ outputs = [branch1x1, branch7x7, branch7x7dbl, branch_pool]
+ return torch.cat(outputs, 1)
+
+
+class FIDInceptionE_1(models.inception.InceptionE):
+ """First InceptionE block patched for FID computation"""
+ def __init__(self, in_channels):
+ super(FIDInceptionE_1, self).__init__(in_channels)
+
+ def forward(self, x):
+ branch1x1 = self.branch1x1(x)
+
+ branch3x3 = self.branch3x3_1(x)
+ branch3x3 = [
+ self.branch3x3_2a(branch3x3),
+ self.branch3x3_2b(branch3x3),
+ ]
+ branch3x3 = torch.cat(branch3x3, 1)
+
+ branch3x3dbl = self.branch3x3dbl_1(x)
+ branch3x3dbl = self.branch3x3dbl_2(branch3x3dbl)
+ branch3x3dbl = [
+ self.branch3x3dbl_3a(branch3x3dbl),
+ self.branch3x3dbl_3b(branch3x3dbl),
+ ]
+ branch3x3dbl = torch.cat(branch3x3dbl, 1)
+
+ # Patch: Tensorflow's average pool does not use the padded zero's in
+ # its average calculation
+ branch_pool = F.avg_pool2d(x, kernel_size=3, stride=1, padding=1,
+ count_include_pad=False)
+ branch_pool = self.branch_pool(branch_pool)
+
+ outputs = [branch1x1, branch3x3, branch3x3dbl, branch_pool]
+ return torch.cat(outputs, 1)
+
+
+class FIDInceptionE_2(models.inception.InceptionE):
+ """Second InceptionE block patched for FID computation"""
+ def __init__(self, in_channels):
+ super(FIDInceptionE_2, self).__init__(in_channels)
+
+ def forward(self, x):
+ branch1x1 = self.branch1x1(x)
+
+ branch3x3 = self.branch3x3_1(x)
+ branch3x3 = [
+ self.branch3x3_2a(branch3x3),
+ self.branch3x3_2b(branch3x3),
+ ]
+ branch3x3 = torch.cat(branch3x3, 1)
+
+ branch3x3dbl = self.branch3x3dbl_1(x)
+ branch3x3dbl = self.branch3x3dbl_2(branch3x3dbl)
+ branch3x3dbl = [
+ self.branch3x3dbl_3a(branch3x3dbl),
+ self.branch3x3dbl_3b(branch3x3dbl),
+ ]
+ branch3x3dbl = torch.cat(branch3x3dbl, 1)
+
+ # Patch: The FID Inception model uses max pooling instead of average
+ # pooling. This is likely an error in this specific Inception
+ # implementation, as other Inception models use average pooling here
+ # (which matches the description in the paper).
+ branch_pool = F.max_pool2d(x, kernel_size=3, stride=1, padding=1)
+ branch_pool = self.branch_pool(branch_pool)
+
+ outputs = [branch1x1, branch3x3, branch3x3dbl, branch_pool]
+ return torch.cat(outputs, 1)
+
+
+class Inception3Feature(Inception3):
+ def forward(self, x):
+ if x.shape[2] != 299 or x.shape[3] != 299:
+ x = F.interpolate(x, size=(299, 299), mode='bilinear', align_corners=True)
+
+ x = self.Conv2d_1a_3x3(x) # 299 x 299 x 3
+ x = self.Conv2d_2a_3x3(x) # 149 x 149 x 32
+ x = self.Conv2d_2b_3x3(x) # 147 x 147 x 32
+ x = F.max_pool2d(x, kernel_size=3, stride=2) # 147 x 147 x 64
+
+ x = self.Conv2d_3b_1x1(x) # 73 x 73 x 64
+ x = self.Conv2d_4a_3x3(x) # 73 x 73 x 80
+ x = F.max_pool2d(x, kernel_size=3, stride=2) # 71 x 71 x 192
+
+ x = self.Mixed_5b(x) # 35 x 35 x 192
+ x = self.Mixed_5c(x) # 35 x 35 x 256
+ x = self.Mixed_5d(x) # 35 x 35 x 288
+
+ x = self.Mixed_6a(x) # 35 x 35 x 288
+ x = self.Mixed_6b(x) # 17 x 17 x 768
+ x = self.Mixed_6c(x) # 17 x 17 x 768
+ x = self.Mixed_6d(x) # 17 x 17 x 768
+ x = self.Mixed_6e(x) # 17 x 17 x 768
+
+ x = self.Mixed_7a(x) # 17 x 17 x 768
+ x = self.Mixed_7b(x) # 8 x 8 x 1280
+ x = self.Mixed_7c(x) # 8 x 8 x 2048
+
+ x = F.avg_pool2d(x, kernel_size=8) # 8 x 8 x 2048
+
+ return x.view(x.shape[0], x.shape[1]) # 1 x 1 x 2048
+
+
+def load_patched_inception_v3():
+ # inception = inception_v3(pretrained=True)
+ # inception_feat = Inception3Feature()
+ # inception_feat.load_state_dict(inception.state_dict())
+ inception_feat = InceptionV3([3], normalize_input=False)
+
+ return inception_feat
+
+
+@torch.no_grad()
+def extract_features(loader, inception, device):
+ pbar = tqdm(loader)
+
+ feature_list = []
+
+ for img in pbar:
+ img = img.to(device)
+ feature = inception(img)[0].view(img.shape[0], -1)
+ feature_list.append(feature.to('cpu'))
+
+ features = torch.cat(feature_list, 0)
+
+ return features
+
+
+
+@torch.no_grad()
+def extract_feature_from_samples(generator, inception, device='cuda'):
+ n_batch = n_sample // batch_size
+ resid = n_sample - (n_batch * batch_size)
+ batch_sizes = [batch_size] * n_batch + [resid]
+ features = []
+
+ for batch in tqdm(batch_sizes):
+ latent = torch.randn(batch, 512, device=device)
+ img, _ = g([latent], truncation=truncation, truncation_latent=truncation_latent)
+ feat = inception(img)[0].view(img.shape[0], -1)
+ features.append(feat.to('cpu'))
+
+ features = torch.cat(features, 0)
+
+ return features
+
+
+@torch.no_grad()
+def extract_feature_from_generator_fn(generator_fn, inception, device='cuda', total=1000):
+ features = []
+ for batch in tqdm(generator_fn, total=total):
+ feat = inception(batch)[0].view(batch.shape[0], -1)
+ features.append(feat.to('cpu'))
+
+ features = torch.cat(features, 0).detach()
+ return features.numpy()
+
+
+def calc_fid(sample_features, real_features=None, real_mean=None, real_cov=None, eps=1e-6):
+ sample_mean = np.mean(sample_features, 0)
+ sample_cov = np.cov(sample_features, rowvar=False)
+
+ if real_features is not None:
+ real_mean = np.mean(real_features, 0)
+ real_cov = np.cov(real_features, rowvar=False)
+
+ cov_sqrt, _ = linalg.sqrtm(sample_cov @ real_cov, disp=False)
+
+ if not np.isfinite(cov_sqrt).all():
+ print('product of cov matrices is singular')
+ offset = np.eye(sample_cov.shape[0]) * eps
+ cov_sqrt = linalg.sqrtm((sample_cov + offset) @ (real_cov + offset))
+
+ if np.iscomplexobj(cov_sqrt):
+ if not np.allclose(np.diagonal(cov_sqrt).imag, 0, atol=1e-3):
+ m = np.max(np.abs(cov_sqrt.imag))
+
+ raise ValueError(f'Imaginary component {m}')
+
+ cov_sqrt = cov_sqrt.real
+
+ mean_diff = sample_mean - real_mean
+ mean_norm = mean_diff @ mean_diff
+
+ trace = np.trace(sample_cov) + np.trace(real_cov) - 2 * np.trace(cov_sqrt)
+
+ fid = mean_norm + trace
+
+ return fid
+
+
+if __name__ == "__main__":
+ #from utils import PairedMultiDataset, InfiniteSamplerWrapper, make_folders, AverageMeter
+ from torch.utils.data import DataLoader
+ from torchvision import utils as vutils
+
+ IM_SIZE = 1024
+ BATCH_SIZE = 16
+ DATALOADER_WORKERS = 8
+ NBR_CLS = 2000
+ TRIAL_NAME = 'trial_vae_512_1'
+ SAVE_FOLDER = './'
+
+ from torchvision.datasets import ImageFolder
+
+ '''
+ data_root_colorful = '../images/celebA/CelebA_512/img'
+ data_root_sketch_1 = './sketch_simplification/vggadin_iter_700'
+ data_root_sketch_2 = './sketch_simplification/vggadin_iter_1900'
+ data_root_sketch_3 = './sketch_simplification/vggadin_iter_2300'
+
+ dataset = PairedMultiDataset(data_root_colorful, data_root_sketch_1, data_root_sketch_2, data_root_sketch_3, im_size=IM_SIZE, rand_crop=False)
+ dataloader = iter(DataLoader(dataset, BATCH_SIZE, shuffle=False, num_workers=DATALOADER_WORKERS, pin_memory=True))
+
+
+ from pretrain_ae import StyleEncoder, ContentEncoder, Decoder
+ import pickle
+ from refine_ae_as_gan import AE, RefineGenerator
+ from utils import load_params
+
+ net_ig = RefineGenerator().cuda()
+ net_ig = nn.DataParallel(net_ig)
+
+ ckpt = './train_results/trial_refine_ae_as_gan_1024_2/models/4.pth'
+ if ckpt is not None:
+ ckpt = torch.load(ckpt)
+ #net_ig.load_state_dict(ckpt['ig'])
+ #net_id.load_state_dict(ckpt['id'])
+ net_ig_ema = ckpt['ig_ema']
+ load_params(net_ig, net_ig_ema)
+ net_ig = net_ig.module
+ #net_ig.eval()
+
+ net_ae = AE()
+ net_ae.load_state_dicts('./train_results/trial_vae_512_1/models/176000.pth')
+ net_ae.cuda()
+ net_ae.eval()
+
+ #style_encoder = StyleEncoder(nbr_cls=NBR_CLS).cuda()
+ #content_encoder = ContentEncoder().cuda()
+ #decoder = Decoder().cuda()
+ '''
+
+ def real_image_loader(dataloader, n_batches=10):
+ counter = 0
+ while counter < n_batches:
+ counter += 1
+ rgb_img, _ = next(dataloader)
+ if counter == 1:
+ vutils.save_image(0.5*(rgb_img+1), 'tmp_real.jpg')
+ yield rgb_img.cuda()
+
+ '''
+ @torch.no_grad()
+ def image_generator_1(dataloader, n_batches=10):
+ counter = 0
+ while counter < n_batches:
+ counter += 1
+ rgb_img, _, _, skt_img = next(dataloader)
+ rgb_img = rgb_img.cuda()
+ skt_img = skt_img.cuda()
+
+ style_feat, _ = style_encoder(rgb_img)
+ content_feats = content_encoder( F.interpolate( skt_img , size=512 ) )
+ gimg = decoder(content_feats, style_feat)
+
+ vutils.save_image(0.5*(gimg+1), 'tmp.jpg')
+ yield gimg
+
+ from utils import true_randperm
+ @torch.no_grad()
+ def image_generator(dataset, net_ae, net_ig, n_batches=500):
+ counter = 0
+ dataloader = iter(DataLoader(dataset, BATCH_SIZE, shuffle=False, num_workers=DATALOADER_WORKERS, pin_memory=False))
+
+ while counter < n_batches:
+ counter += 1
+ rgb_img, _, _, skt_img = next(dataloader)
+ rgb_img = F.interpolate( rgb_img, size=512 ).cuda()
+ skt_img = F.interpolate( skt_img, size=512 ).cuda()
+
+ #perm = true_randperm(rgb_img.shape[0], device=rgb_img.device)
+
+ gimg_ae, style_feat = net_ae(skt_img, rgb_img)
+ g_image = net_ig(gimg_ae, style_feat, skt_img)
+ if counter == 1:
+ vutils.save_image(0.5*(g_image+1), 'tmp.jpg')
+ yield g_image
+ '''
+ inception = load_patched_inception_v3().cuda()
+ inception.eval()
+
+ path_a = '../../../database/images/celebaMask/CelebA_1024'
+ path_b = '../../stylegan/celebahq_samples'
+
+ from torchvision import transforms
+
+ transform = transforms.Compose(
+ [
+ transforms.Resize( (299, 299) ),
+ #transforms.RandomHorizontalFlip(p=0.5 if args.flip else 0),
+ transforms.ToTensor(),
+ transforms.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5]),
+ ]
+ )
+
+ dset_a = ImageFolder(path_a, transform)
+ loader_a = iter(DataLoader(dset_a, batch_size=16, num_workers=4))
+
+ real_features = extract_feature_from_generator_fn(
+ real_image_loader(loader_a, n_batches=900), inception )
+ real_mean = np.mean(real_features, 0)
+ real_cov = np.cov(real_features, rowvar=False)
+
+ #pickle.dump({'feats': real_features, 'mean': real_mean, 'cov': real_cov}, open('celeba_fid_feats.npy','wb') )
+
+ #real_features = pickle.load( open('celeba_fid_feats.npy', 'rb') )
+ #real_mean = real_features['mean']
+ #real_cov = real_features['cov']
+ #sample_features = extract_feature_from_generator_fn( real_image_loader(dataloader, n_batches=100), inception )
+
+ dset_b = ImageFolder(path_b, transform)
+ loader_b = iter(DataLoader(dset_b, batch_size=16, num_workers=4))
+
+ sample_features = extract_feature_from_generator_fn(
+ real_image_loader(loader_b, n_batches=900), inception )
+ #sample_features = extract_feature_from_generator_fn(
+ # image_generator(dataset, net_ae, net_ig, n_batches=1800), inception,
+ # total=1800 )
+
+ #fid = calc_fid(sample_features, real_mean=real_features['mean'], real_cov=real_features['cov'])
+ fid = calc_fid(sample_features, real_mean=real_mean, real_cov=real_cov)
+
+ print(fid)
\ No newline at end of file
diff --git a/benchmarking/calc_inception.py b/benchmarking/calc_inception.py
new file mode 100644
index 0000000000000000000000000000000000000000..b8f0534a95f78dae8b4dbe9872363d7ba11a3b23
--- /dev/null
+++ b/benchmarking/calc_inception.py
@@ -0,0 +1,116 @@
+import argparse
+import pickle
+import os
+
+import torch
+from torch import nn
+from torch.nn import functional as F
+from torch.utils.data import DataLoader
+from torchvision import transforms
+from torchvision.models import inception_v3, Inception3
+import numpy as np
+from tqdm import tqdm
+
+from inception import InceptionV3
+from torchvision.datasets import ImageFolder
+
+class Inception3Feature(Inception3):
+ def forward(self, x):
+ if x.shape[2] != 299 or x.shape[3] != 299:
+ x = F.interpolate(x, size=(299, 299), mode='bilinear', align_corners=True)
+
+ x = self.Conv2d_1a_3x3(x) # 299 x 299 x 3
+ x = self.Conv2d_2a_3x3(x) # 149 x 149 x 32
+ x = self.Conv2d_2b_3x3(x) # 147 x 147 x 32
+ x = F.max_pool2d(x, kernel_size=3, stride=2) # 147 x 147 x 64
+
+ x = self.Conv2d_3b_1x1(x) # 73 x 73 x 64
+ x = self.Conv2d_4a_3x3(x) # 73 x 73 x 80
+ x = F.max_pool2d(x, kernel_size=3, stride=2) # 71 x 71 x 192
+
+ x = self.Mixed_5b(x) # 35 x 35 x 192
+ x = self.Mixed_5c(x) # 35 x 35 x 256
+ x = self.Mixed_5d(x) # 35 x 35 x 288
+
+ x = self.Mixed_6a(x) # 35 x 35 x 288
+ x = self.Mixed_6b(x) # 17 x 17 x 768
+ x = self.Mixed_6c(x) # 17 x 17 x 768
+ x = self.Mixed_6d(x) # 17 x 17 x 768
+ x = self.Mixed_6e(x) # 17 x 17 x 768
+
+ x = self.Mixed_7a(x) # 17 x 17 x 768
+ x = self.Mixed_7b(x) # 8 x 8 x 1280
+ x = self.Mixed_7c(x) # 8 x 8 x 2048
+
+ x = F.avg_pool2d(x, kernel_size=8) # 8 x 8 x 2048
+
+ return x.view(x.shape[0], x.shape[1]) # 1 x 1 x 2048
+
+
+def load_patched_inception_v3():
+ # inception = inception_v3(pretrained=True)
+ # inception_feat = Inception3Feature()
+ # inception_feat.load_state_dict(inception.state_dict())
+ inception_feat = InceptionV3([3], normalize_input=False)
+
+ return inception_feat
+
+
+@torch.no_grad()
+def extract_features(loader, inception, device):
+ pbar = tqdm(loader)
+
+ feature_list = []
+
+ for img,_ in pbar:
+ img = img.to(device)
+ feature = inception(img)[0].view(img.shape[0], -1)
+ feature_list.append(feature.to('cpu'))
+
+ features = torch.cat(feature_list, 0)
+
+ return features
+
+
+if __name__ == '__main__':
+ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
+
+ parser = argparse.ArgumentParser(
+ description='Calculate Inception v3 features for datasets'
+ )
+ parser.add_argument('--size', type=int, default=256)
+ parser.add_argument('--batch', default=64, type=int, help='batch size')
+ parser.add_argument('--n_sample', type=int, default=50000)
+ parser.add_argument('--flip', action='store_true')
+ parser.add_argument('path', metavar='PATH', help='path to datset lmdb file')
+
+ args = parser.parse_args()
+
+ inception = load_patched_inception_v3().eval().to(device)
+
+ transform = transforms.Compose(
+ [
+ transforms.Resize( (args.size, args.size) ),
+ transforms.RandomHorizontalFlip(p=0.5 if args.flip else 0),
+ transforms.ToTensor(),
+ transforms.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5]),
+ ]
+ )
+
+ dset = ImageFolder(args.path, transform)
+ loader = DataLoader(dset, batch_size=args.batch, num_workers=4)
+
+ features = extract_features(loader, inception, device).numpy()
+
+ features = features[: args.n_sample]
+
+ print(f'extracted {features.shape[0]} features')
+
+ mean = np.mean(features, 0)
+ cov = np.cov(features, rowvar=False)
+
+ name = os.path.splitext(os.path.basename(args.path))[0]
+
+ print({'mean': mean.mean(), 'cov': cov.mean()})
+ with open(f'inception_{name}.pkl', 'wb') as f:
+ pickle.dump({'mean': mean, 'cov': cov, 'size': args.size, 'path': args.path}, f)
diff --git a/benchmarking/fid.py b/benchmarking/fid.py
new file mode 100644
index 0000000000000000000000000000000000000000..8d83b4e76240d252050de463d08fbceb836ce02a
--- /dev/null
+++ b/benchmarking/fid.py
@@ -0,0 +1,109 @@
+import argparse
+import pickle
+
+import torch
+from torch import nn
+import numpy as np
+from scipy import linalg
+from tqdm import tqdm
+
+from torchvision import transforms
+from torchvision.datasets import ImageFolder
+from torch.utils.data import DataLoader
+
+from calc_inception import load_patched_inception_v3
+import os
+
+@torch.no_grad()
+def extract_features(loader, inception, device):
+ pbar = tqdm(loader)
+
+ feature_list = []
+
+ for img,_ in pbar:
+ img = img.to(device)
+ feature = inception(img)[0].view(img.shape[0], -1)
+ feature_list.append(feature.to('cpu'))
+
+ features = torch.cat(feature_list, 0)
+
+ return features
+
+
+def calc_fid(sample_mean, sample_cov, real_mean, real_cov, eps=1e-6):
+ cov_sqrt, _ = linalg.sqrtm(sample_cov @ real_cov, disp=False)
+
+ if not np.isfinite(cov_sqrt).all():
+ print('product of cov matrices is singular')
+ offset = np.eye(sample_cov.shape[0]) * eps
+ cov_sqrt = linalg.sqrtm((sample_cov + offset) @ (real_cov + offset))
+
+ if np.iscomplexobj(cov_sqrt):
+ if not np.allclose(np.diagonal(cov_sqrt).imag, 0, atol=1e-3):
+ m = np.max(np.abs(cov_sqrt.imag))
+
+ raise ValueError(f'Imaginary component {m}')
+
+ cov_sqrt = cov_sqrt.real
+
+ mean_diff = sample_mean - real_mean
+ mean_norm = mean_diff @ mean_diff
+
+ trace = np.trace(sample_cov) + np.trace(real_cov) - 2 * np.trace(cov_sqrt)
+
+ fid = mean_norm + trace
+
+ return fid
+
+
+if __name__ == '__main__':
+ device = 'cuda'
+
+ parser = argparse.ArgumentParser()
+
+ parser.add_argument('--batch', type=int, default=64)
+ parser.add_argument('--size', type=int, default=256)
+ parser.add_argument('--path_a', type=str)
+ parser.add_argument('--path_b', type=str)
+ parser.add_argument('--iter', type=int, default=3)
+ parser.add_argument('--end', type=int, default=13)
+
+ args = parser.parse_args()
+
+ inception = load_patched_inception_v3().eval().to(device)
+
+ transform = transforms.Compose(
+ [
+ transforms.Resize( (args.size, args.size) ),
+ #transforms.RandomHorizontalFlip(p=0.5 if args.flip else 0),
+ transforms.ToTensor(),
+ transforms.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5]),
+ ]
+ )
+
+ dset_a = ImageFolder(args.path_a, transform)
+ loader_a = DataLoader(dset_a, batch_size=args.batch, num_workers=4)
+
+ features_a = extract_features(loader_a, inception, device).numpy()
+ print(f'extracted {features_a.shape[0]} features')
+
+ real_mean = np.mean(features_a, 0)
+ real_cov = np.cov(features_a, rowvar=False)
+
+ #for folder in os.listdir(args.path_b):
+ for folder in range(args.iter,args.end+1):
+ folder = 'eval_%d'%(folder*10000)
+ if os.path.exists(os.path.join( args.path_b, folder )):
+ print(folder)
+ dset_b = ImageFolder( os.path.join( args.path_b, folder ), transform)
+ loader_b = DataLoader(dset_b, batch_size=args.batch, num_workers=4)
+
+ features_b = extract_features(loader_b, inception, device).numpy()
+ print(f'extracted {features_b.shape[0]} features')
+
+ sample_mean = np.mean(features_b, 0)
+ sample_cov = np.cov(features_b, rowvar=False)
+
+ fid = calc_fid(sample_mean, sample_cov, real_mean, real_cov)
+
+ print(folder, ' fid:', fid)
diff --git a/benchmarking/inception.py b/benchmarking/inception.py
new file mode 100644
index 0000000000000000000000000000000000000000..f3afed8123e595f65c1333dea7151e653a836e2b
--- /dev/null
+++ b/benchmarking/inception.py
@@ -0,0 +1,310 @@
+import torch
+import torch.nn as nn
+import torch.nn.functional as F
+from torchvision import models
+
+try:
+ from torchvision.models.utils import load_state_dict_from_url
+except ImportError:
+ from torch.utils.model_zoo import load_url as load_state_dict_from_url
+
+# Inception weights ported to Pytorch from
+# http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz
+FID_WEIGHTS_URL = 'https://github.com/mseitzer/pytorch-fid/releases/download/fid_weights/pt_inception-2015-12-05-6726825d.pth'
+
+
+class InceptionV3(nn.Module):
+ """Pretrained InceptionV3 network returning feature maps"""
+
+ # Index of default block of inception to return,
+ # corresponds to output of final average pooling
+ DEFAULT_BLOCK_INDEX = 3
+
+ # Maps feature dimensionality to their output blocks indices
+ BLOCK_INDEX_BY_DIM = {
+ 64: 0, # First max pooling features
+ 192: 1, # Second max pooling featurs
+ 768: 2, # Pre-aux classifier features
+ 2048: 3 # Final average pooling features
+ }
+
+ def __init__(self,
+ output_blocks=[DEFAULT_BLOCK_INDEX],
+ resize_input=True,
+ normalize_input=True,
+ requires_grad=False,
+ use_fid_inception=True):
+ """Build pretrained InceptionV3
+
+ Parameters
+ ----------
+ output_blocks : list of int
+ Indices of blocks to return features of. Possible values are:
+ - 0: corresponds to output of first max pooling
+ - 1: corresponds to output of second max pooling
+ - 2: corresponds to output which is fed to aux classifier
+ - 3: corresponds to output of final average pooling
+ resize_input : bool
+ If true, bilinearly resizes input to width and height 299 before
+ feeding input to model. As the network without fully connected
+ layers is fully convolutional, it should be able to handle inputs
+ of arbitrary size, so resizing might not be strictly needed
+ normalize_input : bool
+ If true, scales the input from range (0, 1) to the range the
+ pretrained Inception network expects, namely (-1, 1)
+ requires_grad : bool
+ If true, parameters of the model require gradients. Possibly useful
+ for finetuning the network
+ use_fid_inception : bool
+ If true, uses the pretrained Inception model used in Tensorflow's
+ FID implementation. If false, uses the pretrained Inception model
+ available in torchvision. The FID Inception model has different
+ weights and a slightly different structure from torchvision's
+ Inception model. If you want to compute FID scores, you are
+ strongly advised to set this parameter to true to get comparable
+ results.
+ """
+ super(InceptionV3, self).__init__()
+
+ self.resize_input = resize_input
+ self.normalize_input = normalize_input
+ self.output_blocks = sorted(output_blocks)
+ self.last_needed_block = max(output_blocks)
+
+ assert self.last_needed_block <= 3, \
+ 'Last possible output block index is 3'
+
+ self.blocks = nn.ModuleList()
+
+ if use_fid_inception:
+ inception = fid_inception_v3()
+ else:
+ inception = models.inception_v3(pretrained=True)
+
+ # Block 0: input to maxpool1
+ block0 = [
+ inception.Conv2d_1a_3x3,
+ inception.Conv2d_2a_3x3,
+ inception.Conv2d_2b_3x3,
+ nn.MaxPool2d(kernel_size=3, stride=2)
+ ]
+ self.blocks.append(nn.Sequential(*block0))
+
+ # Block 1: maxpool1 to maxpool2
+ if self.last_needed_block >= 1:
+ block1 = [
+ inception.Conv2d_3b_1x1,
+ inception.Conv2d_4a_3x3,
+ nn.MaxPool2d(kernel_size=3, stride=2)
+ ]
+ self.blocks.append(nn.Sequential(*block1))
+
+ # Block 2: maxpool2 to aux classifier
+ if self.last_needed_block >= 2:
+ block2 = [
+ inception.Mixed_5b,
+ inception.Mixed_5c,
+ inception.Mixed_5d,
+ inception.Mixed_6a,
+ inception.Mixed_6b,
+ inception.Mixed_6c,
+ inception.Mixed_6d,
+ inception.Mixed_6e,
+ ]
+ self.blocks.append(nn.Sequential(*block2))
+
+ # Block 3: aux classifier to final avgpool
+ if self.last_needed_block >= 3:
+ block3 = [
+ inception.Mixed_7a,
+ inception.Mixed_7b,
+ inception.Mixed_7c,
+ nn.AdaptiveAvgPool2d(output_size=(1, 1))
+ ]
+ self.blocks.append(nn.Sequential(*block3))
+
+ for param in self.parameters():
+ param.requires_grad = requires_grad
+
+ def forward(self, inp):
+ """Get Inception feature maps
+
+ Parameters
+ ----------
+ inp : torch.autograd.Variable
+ Input tensor of shape Bx3xHxW. Values are expected to be in
+ range (0, 1)
+
+ Returns
+ -------
+ List of torch.autograd.Variable, corresponding to the selected output
+ block, sorted ascending by index
+ """
+ outp = []
+ x = inp
+
+ if self.resize_input:
+ x = F.interpolate(x,
+ size=(299, 299),
+ mode='bilinear',
+ align_corners=False)
+
+ if self.normalize_input:
+ x = 2 * x - 1 # Scale from range (0, 1) to range (-1, 1)
+
+ for idx, block in enumerate(self.blocks):
+ x = block(x)
+ if idx in self.output_blocks:
+ outp.append(x)
+
+ if idx == self.last_needed_block:
+ break
+
+ return outp
+
+
+def fid_inception_v3():
+ """Build pretrained Inception model for FID computation
+
+ The Inception model for FID computation uses a different set of weights
+ and has a slightly different structure than torchvision's Inception.
+
+ This method first constructs torchvision's Inception and then patches the
+ necessary parts that are different in the FID Inception model.
+ """
+ inception = models.inception_v3(num_classes=1008,
+ aux_logits=False,
+ pretrained=False)
+ inception.Mixed_5b = FIDInceptionA(192, pool_features=32)
+ inception.Mixed_5c = FIDInceptionA(256, pool_features=64)
+ inception.Mixed_5d = FIDInceptionA(288, pool_features=64)
+ inception.Mixed_6b = FIDInceptionC(768, channels_7x7=128)
+ inception.Mixed_6c = FIDInceptionC(768, channels_7x7=160)
+ inception.Mixed_6d = FIDInceptionC(768, channels_7x7=160)
+ inception.Mixed_6e = FIDInceptionC(768, channels_7x7=192)
+ inception.Mixed_7b = FIDInceptionE_1(1280)
+ inception.Mixed_7c = FIDInceptionE_2(2048)
+
+ state_dict = load_state_dict_from_url(FID_WEIGHTS_URL, progress=True)
+ inception.load_state_dict(state_dict)
+ return inception
+
+
+class FIDInceptionA(models.inception.InceptionA):
+ """InceptionA block patched for FID computation"""
+ def __init__(self, in_channels, pool_features):
+ super(FIDInceptionA, self).__init__(in_channels, pool_features)
+
+ def forward(self, x):
+ branch1x1 = self.branch1x1(x)
+
+ branch5x5 = self.branch5x5_1(x)
+ branch5x5 = self.branch5x5_2(branch5x5)
+
+ branch3x3dbl = self.branch3x3dbl_1(x)
+ branch3x3dbl = self.branch3x3dbl_2(branch3x3dbl)
+ branch3x3dbl = self.branch3x3dbl_3(branch3x3dbl)
+
+ # Patch: Tensorflow's average pool does not use the padded zero's in
+ # its average calculation
+ branch_pool = F.avg_pool2d(x, kernel_size=3, stride=1, padding=1,
+ count_include_pad=False)
+ branch_pool = self.branch_pool(branch_pool)
+
+ outputs = [branch1x1, branch5x5, branch3x3dbl, branch_pool]
+ return torch.cat(outputs, 1)
+
+
+class FIDInceptionC(models.inception.InceptionC):
+ """InceptionC block patched for FID computation"""
+ def __init__(self, in_channels, channels_7x7):
+ super(FIDInceptionC, self).__init__(in_channels, channels_7x7)
+
+ def forward(self, x):
+ branch1x1 = self.branch1x1(x)
+
+ branch7x7 = self.branch7x7_1(x)
+ branch7x7 = self.branch7x7_2(branch7x7)
+ branch7x7 = self.branch7x7_3(branch7x7)
+
+ branch7x7dbl = self.branch7x7dbl_1(x)
+ branch7x7dbl = self.branch7x7dbl_2(branch7x7dbl)
+ branch7x7dbl = self.branch7x7dbl_3(branch7x7dbl)
+ branch7x7dbl = self.branch7x7dbl_4(branch7x7dbl)
+ branch7x7dbl = self.branch7x7dbl_5(branch7x7dbl)
+
+ # Patch: Tensorflow's average pool does not use the padded zero's in
+ # its average calculation
+ branch_pool = F.avg_pool2d(x, kernel_size=3, stride=1, padding=1,
+ count_include_pad=False)
+ branch_pool = self.branch_pool(branch_pool)
+
+ outputs = [branch1x1, branch7x7, branch7x7dbl, branch_pool]
+ return torch.cat(outputs, 1)
+
+
+class FIDInceptionE_1(models.inception.InceptionE):
+ """First InceptionE block patched for FID computation"""
+ def __init__(self, in_channels):
+ super(FIDInceptionE_1, self).__init__(in_channels)
+
+ def forward(self, x):
+ branch1x1 = self.branch1x1(x)
+
+ branch3x3 = self.branch3x3_1(x)
+ branch3x3 = [
+ self.branch3x3_2a(branch3x3),
+ self.branch3x3_2b(branch3x3),
+ ]
+ branch3x3 = torch.cat(branch3x3, 1)
+
+ branch3x3dbl = self.branch3x3dbl_1(x)
+ branch3x3dbl = self.branch3x3dbl_2(branch3x3dbl)
+ branch3x3dbl = [
+ self.branch3x3dbl_3a(branch3x3dbl),
+ self.branch3x3dbl_3b(branch3x3dbl),
+ ]
+ branch3x3dbl = torch.cat(branch3x3dbl, 1)
+
+ # Patch: Tensorflow's average pool does not use the padded zero's in
+ # its average calculation
+ branch_pool = F.avg_pool2d(x, kernel_size=3, stride=1, padding=1,
+ count_include_pad=False)
+ branch_pool = self.branch_pool(branch_pool)
+
+ outputs = [branch1x1, branch3x3, branch3x3dbl, branch_pool]
+ return torch.cat(outputs, 1)
+
+
+class FIDInceptionE_2(models.inception.InceptionE):
+ """Second InceptionE block patched for FID computation"""
+ def __init__(self, in_channels):
+ super(FIDInceptionE_2, self).__init__(in_channels)
+
+ def forward(self, x):
+ branch1x1 = self.branch1x1(x)
+
+ branch3x3 = self.branch3x3_1(x)
+ branch3x3 = [
+ self.branch3x3_2a(branch3x3),
+ self.branch3x3_2b(branch3x3),
+ ]
+ branch3x3 = torch.cat(branch3x3, 1)
+
+ branch3x3dbl = self.branch3x3dbl_1(x)
+ branch3x3dbl = self.branch3x3dbl_2(branch3x3dbl)
+ branch3x3dbl = [
+ self.branch3x3dbl_3a(branch3x3dbl),
+ self.branch3x3dbl_3b(branch3x3dbl),
+ ]
+ branch3x3dbl = torch.cat(branch3x3dbl, 1)
+
+ # Patch: The FID Inception model uses max pooling instead of average
+ # pooling. This is likely an error in this specific Inception
+ # implementation, as other Inception models use average pooling here
+ # (which matches the description in the paper).
+ branch_pool = F.max_pool2d(x, kernel_size=3, stride=1, padding=1)
+ branch_pool = self.branch_pool(branch_pool)
+
+ outputs = [branch1x1, branch3x3, branch3x3dbl, branch_pool]
+ return torch.cat(outputs, 1)
diff --git a/dataset1/F--DvrzacAEhutq.jpg b/dataset1/F--DvrzacAEhutq.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..16895c6f070fcaefaeca76a55925a50a8f6641c8
--- /dev/null
+++ b/dataset1/F--DvrzacAEhutq.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ce824c6b5bddc60b18f16c99d3fcc468b0c09b8cd203c47b930492650ab1da11
+size 1881420
diff --git a/dataset1/F-FBTF2agAAzg8H.jpg b/dataset1/F-FBTF2agAAzg8H.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..3c7bfaf6058f9d5bfa7712485eb02120b2cfd5cd
--- /dev/null
+++ b/dataset1/F-FBTF2agAAzg8H.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3af8c40e997ce4de578a1226a051f563d701165792e3605cb8e348a8b936aa5a
+size 1524859
diff --git a/dataset1/F-Kait-bUAA4-QI.jpg b/dataset1/F-Kait-bUAA4-QI.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..4706df7cdcacdccf70aac2fd29156c18ab6c0b90
--- /dev/null
+++ b/dataset1/F-Kait-bUAA4-QI.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6b45250f77143691157f90f8832c63c49d21ac2296c3c19a8a6e339b78bab636
+size 140114
diff --git a/dataset1/F-j9uULbEAAnCJN.jpg b/dataset1/F-j9uULbEAAnCJN.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..15fc5e32809d5c47de35d02c429d27c8ce49532d
--- /dev/null
+++ b/dataset1/F-j9uULbEAAnCJN.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cbd8f31f165fcdec7bb4799e13ada18d4099dcebbd823d639a0a51fb4fbafdfd
+size 115281
diff --git a/dataset1/F415ufeaoAA0o1S.jpg b/dataset1/F415ufeaoAA0o1S.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ed0723243d1c2b5172ea50c8e9c4338b7a910b89
--- /dev/null
+++ b/dataset1/F415ufeaoAA0o1S.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ca02d3b45e08901bb11ba682442146b2a067b0f997bbd7d527355a59b0f7b6b0
+size 902929
diff --git a/dataset1/F415ufnbMAAuQOs.jpg b/dataset1/F415ufnbMAAuQOs.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..3b48ff27fbaf9ace7dc8f2e66f03da244925b4cd
--- /dev/null
+++ b/dataset1/F415ufnbMAAuQOs.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:29e0b49f4021f261d0225c4900415adae5c76bb57d2812e997b11f50dd945f4d
+size 901837
diff --git a/dataset1/F89Bc9dawAA5Vlx.jpg b/dataset1/F89Bc9dawAA5Vlx.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..07e15d5d021c676a75a487a89a7521be8eee8366
--- /dev/null
+++ b/dataset1/F89Bc9dawAA5Vlx.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8afef9285dee690722725b5e89328328cd111478e1f2e868a22ab9554f21baa5
+size 642081
diff --git a/dataset1/F92caRWagAA5VaW.jpg b/dataset1/F92caRWagAA5VaW.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..01accaf3431c905b65f56e78001c7aa8187eb02d
--- /dev/null
+++ b/dataset1/F92caRWagAA5VaW.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c2eb621a1d8edb4f4d300847584942a74c19ed4eaf1d537481cbeccdbb422df9
+size 407976
diff --git a/dataset1/F92lVehbsAACADq.jpg b/dataset1/F92lVehbsAACADq.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..5b8484e5ff11b66841f0ebf71c79cfebbab7da0a
--- /dev/null
+++ b/dataset1/F92lVehbsAACADq.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5c7bfe3bbfa4d25afef2e58cfba7fa2e1e1ec4260fcfee2aae5f0f29fc400391
+size 522401
diff --git a/dataset1/F98gge7asAADugl.jpg b/dataset1/F98gge7asAADugl.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..2b20713108b67b056c5bd55e04b879c69c918a10
--- /dev/null
+++ b/dataset1/F98gge7asAADugl.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6fdd648587ed3d6778e2b60d4db01c3b997bcd5f4f6c17c5677d5a31019ce713
+size 329085
diff --git a/dataset1/FD6D3AA584B393E4A55591427142AEDD.jpg b/dataset1/FD6D3AA584B393E4A55591427142AEDD.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..1bc4ce667d1167a8aaa090044087cd9dbb42d72c
--- /dev/null
+++ b/dataset1/FD6D3AA584B393E4A55591427142AEDD.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c6c2f8e98e7e155aa5f5bf38670beab082359364be13205c876a1b2041fdceec
+size 108564
diff --git a/dataset1/FEzHC7CVcAYv_GZ.jpg b/dataset1/FEzHC7CVcAYv_GZ.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6082a760ff440663f3e0d63fb04343594be03b6f
--- /dev/null
+++ b/dataset1/FEzHC7CVcAYv_GZ.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4483c0beb10ff45fff255c29a12a34f72957cc52a6c0b1a9b7386b4987f81729
+size 2992060
diff --git a/dataset1/FFO4s5IVEAMiBDk.jpg b/dataset1/FFO4s5IVEAMiBDk.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ba72844d7502643eaf909ed3d9bf4b2a1f6b7d25
--- /dev/null
+++ b/dataset1/FFO4s5IVEAMiBDk.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e9d1a1f5a533529083f0de4d87ca61560ebfd43e721330290f0df20369fc4142
+size 2395647
diff --git a/dataset1/FFwwrZYVkAAQPQM.jpg b/dataset1/FFwwrZYVkAAQPQM.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6ca5c9f2bddfc1748de2e8c1b8843ec7cfc34365
--- /dev/null
+++ b/dataset1/FFwwrZYVkAAQPQM.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4e4d3b8a0f53ffa3af898a72443c095e052f7f639a4af1310bb817860a7b0cd1
+size 151533
diff --git a/dataset1/FGohLfCVEAEtYqV.jpg b/dataset1/FGohLfCVEAEtYqV.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..a09fa6d7f21d3b26e0a4c55993d6749de62e0e87
--- /dev/null
+++ b/dataset1/FGohLfCVEAEtYqV.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c590212cb8b66d1af2fc0ef25cb2b0491f704dbc6eaebcef0610ec1f774ae1a2
+size 1216339
diff --git a/dataset1/FH-rpMTWUAEhMtb.jpg b/dataset1/FH-rpMTWUAEhMtb.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..1c2d181965412cd1cc4b3c6d7276a6991fa53926
--- /dev/null
+++ b/dataset1/FH-rpMTWUAEhMtb.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c1ac395c20f5c199272e8cf73ae686b02efb398c17ead9a80851246af337be3d
+size 2670551
diff --git a/dataset1/FJNOY_4aMAAPz6j.jpg b/dataset1/FJNOY_4aMAAPz6j.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..3e15f69af2b24cde1623322ee406e90f9a3b21cb
--- /dev/null
+++ b/dataset1/FJNOY_4aMAAPz6j.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ef009d83955302593bb04eb69a9faaa12c31b1d67d668a5c1f3ae0380793c44c
+size 329280
diff --git a/dataset1/FK3joP1UcAAiqaS.jpg b/dataset1/FK3joP1UcAAiqaS.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..e28f918cd36e6aac3549866ee32bde8cb65c5734
--- /dev/null
+++ b/dataset1/FK3joP1UcAAiqaS.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:425021d571aa7c33bb77e748f4a05f817e0f6d977d6ea62d50fa0766b12b8f48
+size 693133
diff --git a/dataset1/FKhZhmvaAAA42Xw.jpg b/dataset1/FKhZhmvaAAA42Xw.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..dd81e69ed2c6d827c7200ba79ad57aa11b31c820
--- /dev/null
+++ b/dataset1/FKhZhmvaAAA42Xw.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e0983b96790863ba6823ce31d5f4b049497fb3ce0c191775f3775229b038eb10
+size 1508003
diff --git a/dataset1/FKwG4YGaUAQuBhz.png b/dataset1/FKwG4YGaUAQuBhz.png
new file mode 100644
index 0000000000000000000000000000000000000000..dffb46b31115232c0798d5a9693d3a20bcbf098a
--- /dev/null
+++ b/dataset1/FKwG4YGaUAQuBhz.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bc01fef169bbccceab41601c386a95fb11e0eace426d764101490cde216daa91
+size 127807
diff --git a/dataset1/FaA6jYdXgAEUhbC.jpg b/dataset1/FaA6jYdXgAEUhbC.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ac340bd035c7ec97f906f8f94a1423efc853a6b1
--- /dev/null
+++ b/dataset1/FaA6jYdXgAEUhbC.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1906904253b03c7dab0d8ad1782bf3c53e3ebae33ba8e5112edaf602ae5deae9
+size 153323
diff --git a/dataset1/FaQa7v-aMAEksWG.jpg b/dataset1/FaQa7v-aMAEksWG.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..71a538d6673df4157c6820f7b986169699869270
--- /dev/null
+++ b/dataset1/FaQa7v-aMAEksWG.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fb399bc66a3cc2ec1b5186db9fcec0b932ac37d85747b6e04d77b32323af593f
+size 214249
diff --git a/dataset1/FahocS8VQAArokM.jpg b/dataset1/FahocS8VQAArokM.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..c65708a66ff1196ba2774ee33b144a91b5e4b850
--- /dev/null
+++ b/dataset1/FahocS8VQAArokM.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d262c9b42ee850ffd8a38ed13ef4c740a0da2c3d49bd6322274b31de419ca66e
+size 971654
diff --git a/dataset1/FahocTEUUAI59uL.jpg b/dataset1/FahocTEUUAI59uL.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..b92c33cc0bec364abea8f5a3b1a903bddb29846e
--- /dev/null
+++ b/dataset1/FahocTEUUAI59uL.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d503a1f07fe4134f4cf599ad247ed352a7d54e7fc0851f2e7a1b612dfac61d92
+size 928305
diff --git a/dataset1/FahocTIUYAAC_6d.jpg b/dataset1/FahocTIUYAAC_6d.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..b5a284f087ab9f13c6ecff102913757ad6a188aa
--- /dev/null
+++ b/dataset1/FahocTIUYAAC_6d.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e75b6f4d7ee740881924c6ef30b5f395e78ff5b6b215c085cbd7fc62014c06ae
+size 875152
diff --git a/dataset1/FbPmqIdacAAuhsa.jpg b/dataset1/FbPmqIdacAAuhsa.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..63e065d14766e93b8ddce785c76825ef47497bf2
--- /dev/null
+++ b/dataset1/FbPmqIdacAAuhsa.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ff4830be83e8f378c5bb2c4a351ce0b13132a512c311ecea186233f0060149f2
+size 447564
diff --git a/dataset1/FcNBKs_acAAdbo_.jpg b/dataset1/FcNBKs_acAAdbo_.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..cadbcddb16a6291c5599fb3a0aaae6e0e85cbd21
--- /dev/null
+++ b/dataset1/FcNBKs_acAAdbo_.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3ce2070f8323ce6403252bd2e32fc2d85dd7fedf0e7db856d55312b2b83b4d7a
+size 231281
diff --git a/dataset1/FcNdYeHakAMNLDL.jpg b/dataset1/FcNdYeHakAMNLDL.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9161e45c37036325d4ab6ac9e651c0d2a271c33d
--- /dev/null
+++ b/dataset1/FcNdYeHakAMNLDL.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:58037e0631048790924e6903be97262f8f17b4ea8d084425eaf3960f47d727f2
+size 140355
diff --git a/dataset1/FcR6Wt4WIAAnDSj.jpg b/dataset1/FcR6Wt4WIAAnDSj.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..18435a54dd2243473558e0aadba436315d52c6a9
Binary files /dev/null and b/dataset1/FcR6Wt4WIAAnDSj.jpg differ
diff --git a/dataset1/Fcx5wppaMAc_jjA.jpg b/dataset1/Fcx5wppaMAc_jjA.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..d60389de5d3cd85ef56e6286af10f5d1dd4cda99
--- /dev/null
+++ b/dataset1/Fcx5wppaMAc_jjA.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3213943866e5afad2747949c29663236b8dc6235fd85dd059677daa647d5d5dc
+size 104756
diff --git a/dataset1/FdoReOraIAErEoN.jpg b/dataset1/FdoReOraIAErEoN.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..d48a3eed92a26825d53617aac057a0acc223a01d
--- /dev/null
+++ b/dataset1/FdoReOraIAErEoN.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:af1a1cd316a8881aa48f0d09e950e766e13443906e189d6b6f5455ab99249b80
+size 134229
diff --git a/dataset1/Fe3YAAXUoAApm-c.png b/dataset1/Fe3YAAXUoAApm-c.png
new file mode 100644
index 0000000000000000000000000000000000000000..5a3ecdb809d345f54a661e23a0ea6399ce061dc2
--- /dev/null
+++ b/dataset1/Fe3YAAXUoAApm-c.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f74eeb1a89be4c8e1af9552283680c5a8cfbb08d26ee78fc321b70b07d3d4586
+size 574306
diff --git a/dataset1/Ff6QQsgUoAACRmz.jpg b/dataset1/Ff6QQsgUoAACRmz.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..8a87d46312f75dbddd43303f59f94c41224a96d9
--- /dev/null
+++ b/dataset1/Ff6QQsgUoAACRmz.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:39dade6d48de25b9f7ee363b36742bedfa93ba14bd8975b3da5678cb8f68a32b
+size 627941
diff --git a/dataset1/FfaoRB2aYAMuNRy.jpg b/dataset1/FfaoRB2aYAMuNRy.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6fefb33450d13a9e3b03ac75b4033237ad6ff9f9
--- /dev/null
+++ b/dataset1/FfaoRB2aYAMuNRy.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:90354c4c646769397b5577f4279d07661fe8a06279e8aad13ef0da57d47a9f05
+size 475517
diff --git a/dataset1/Fh-VsdYaEAAzz8j.jpg b/dataset1/Fh-VsdYaEAAzz8j.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..76fbce23a59ca09ddf71044e90760ff8fea0bca1
--- /dev/null
+++ b/dataset1/Fh-VsdYaEAAzz8j.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3f1fbf5040f51abd167cae03ff7924d44aa846542b479388f895b401edee98ea
+size 417963
diff --git a/dataset1/Fh2U2CWagAADmDQ.jpg b/dataset1/Fh2U2CWagAADmDQ.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..fcb03d98aca4c540d9afbbdd3ef17476add39296
Binary files /dev/null and b/dataset1/Fh2U2CWagAADmDQ.jpg differ
diff --git a/dataset1/FhLMi19XEAAluLj.jpg b/dataset1/FhLMi19XEAAluLj.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ad9eab8f827633b3029469865fc856a864653615
--- /dev/null
+++ b/dataset1/FhLMi19XEAAluLj.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:14d6daee59fcb940e01eb403767c17f7538e19b531fbf92892fcba6bc16dba6e
+size 295596
diff --git a/dataset1/FhP6Z9AUoAA589v.jpg b/dataset1/FhP6Z9AUoAA589v.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..816dddd944c920cc4f49c53cca9fc1276631181d
--- /dev/null
+++ b/dataset1/FhP6Z9AUoAA589v.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1e7e200cb365d282301d81b5c7c9bb0e757ada3502e892afcd13f5da3c35b6fc
+size 570619
diff --git a/dataset1/FhRQoruUoAAP01r.jpg b/dataset1/FhRQoruUoAAP01r.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..386b1776c0ea7103fade7e486308402507f33a86
--- /dev/null
+++ b/dataset1/FhRQoruUoAAP01r.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:302409e1850dcc892fa89d4b6c8de0d54c32628288c37809e200ff0533d20a71
+size 492078
diff --git a/dataset1/Fi3Xl3BUYAEQODZ.jpg b/dataset1/Fi3Xl3BUYAEQODZ.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..2a5b00ff9a3ad8c8da7a9bd9e07ff68d1077d4e2
--- /dev/null
+++ b/dataset1/Fi3Xl3BUYAEQODZ.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6e74268596781f08eaf640febb27ed1f6c3366c33b32f1d3a49d2d8a1731c982
+size 203634
diff --git a/dataset1/Fjs20usaUAAt7Kd.jpg b/dataset1/Fjs20usaUAAt7Kd.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..8a15bdd45a9a7b493a491888398b26c11635ac51
Binary files /dev/null and b/dataset1/Fjs20usaUAAt7Kd.jpg differ
diff --git a/dataset1/FkQenw3aMAAWI_v.jpg b/dataset1/FkQenw3aMAAWI_v.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..7e13178b27f722e0ac2daa6f9c2b073ddbd2effd
Binary files /dev/null and b/dataset1/FkQenw3aMAAWI_v.jpg differ
diff --git a/dataset1/FkghA1AakAA_rag.jpg b/dataset1/FkghA1AakAA_rag.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..38cab371de15c584e7556a3938231c70cadffc2e
Binary files /dev/null and b/dataset1/FkghA1AakAA_rag.jpg differ
diff --git a/dataset1/GQHCTV2boAA7exI.png b/dataset1/GQHCTV2boAA7exI.png
new file mode 100644
index 0000000000000000000000000000000000000000..dd86e17b035d643a4d9f6f323206228e8e7d777a
--- /dev/null
+++ b/dataset1/GQHCTV2boAA7exI.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:296b69ee112f6d60efd8ee49f7a60383abdd16264e606655729e71a66d6f3ce3
+size 1106939
diff --git a/dataset1/GQHdSY1bcAA6yFk.jpg b/dataset1/GQHdSY1bcAA6yFk.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..97d0476bd95b8ab30bdfcc6a063517fefc1604a5
--- /dev/null
+++ b/dataset1/GQHdSY1bcAA6yFk.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:000a0c56def4af0c728497dc4ea14f413dd7555e2086f7df3bf2d8cda54ccd62
+size 180341
diff --git a/dataset1/GQL6xwPagAAhACE.png b/dataset1/GQL6xwPagAAhACE.png
new file mode 100644
index 0000000000000000000000000000000000000000..2b0b652c71cf8d7f77fed04268cf57bc62e49d85
--- /dev/null
+++ b/dataset1/GQL6xwPagAAhACE.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2bd8324104d0db016e165f06b0392f6afb9e5e58665807f661562dbeeea634c6
+size 285000
diff --git a/dataset1/GQLwtIEaIAA4qDs.jpg b/dataset1/GQLwtIEaIAA4qDs.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ab9c920db69528c8c20efe70a9ca7b36f00cb134
--- /dev/null
+++ b/dataset1/GQLwtIEaIAA4qDs.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2ed63b75e6a7c2db9aadaae249f8596804fcb522408cd2e21b3c239fa15c4bf7
+size 836941
diff --git a/dataset1/GQQ8sSmakAAXnfD.jpg b/dataset1/GQQ8sSmakAAXnfD.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9584da261ca1870fd46e1a1557cac58609303493
Binary files /dev/null and b/dataset1/GQQ8sSmakAAXnfD.jpg differ
diff --git a/dataset1/GQQd0NHbMAAR8iA.jpg b/dataset1/GQQd0NHbMAAR8iA.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..5aa81099a09df8e215c1dfa64b43d0f394753fc0
--- /dev/null
+++ b/dataset1/GQQd0NHbMAAR8iA.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c2bd1884271727d12102a97632037bf5195597395008f66bf1146376bc9f297a
+size 321346
diff --git a/dataset1/GQQd0NKaUAAWLJF.jpg b/dataset1/GQQd0NKaUAAWLJF.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..d1a1f650211c22594723b4fb8744f648fad17b43
--- /dev/null
+++ b/dataset1/GQQd0NKaUAAWLJF.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d1a55f112e462df6cac21e616f2fe984d6a110e6ba7f4209344f57665aecc097
+size 340621
diff --git a/dataset1/GQVPH-2bkAALrxT.jpg b/dataset1/GQVPH-2bkAALrxT.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..1937c2a92f37a3e2a59f862ebbfc66f9e53bbf00
--- /dev/null
+++ b/dataset1/GQVPH-2bkAALrxT.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fb1d0e36501e13b65290bb871e6e48386bf137cb62736c9fe669389b536d5c92
+size 2359724
diff --git a/dataset1/GQWAfGgbUAA06WB.jpg b/dataset1/GQWAfGgbUAA06WB.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..16ab6e021044eaf6f6fef278105e94e8eef31584
--- /dev/null
+++ b/dataset1/GQWAfGgbUAA06WB.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:19e5a6c8449f2b585869dbc3a9248dab7b062985b506b6d2b7efaa8cabad50a8
+size 410383
diff --git a/dataset1/GQmj-cCaAAAD2z6.jpg b/dataset1/GQmj-cCaAAAD2z6.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ee42a7471807cf4dc0330fddeab6cfd9a9caee1d
--- /dev/null
+++ b/dataset1/GQmj-cCaAAAD2z6.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3b205939b38cff7e14975021c821a845653a0540eda8930ba6389b1a1da4fe61
+size 133884
diff --git a/dataset1/GQnO89ZakAAbEKj.jpg b/dataset1/GQnO89ZakAAbEKj.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0f848b71a31c557538379ba27c07b3465ce6f0ee
--- /dev/null
+++ b/dataset1/GQnO89ZakAAbEKj.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5949cda3ce89a69c950e1f8753e04a0258de1201b1d5cc819c97c6eaa713a5fb
+size 254814
diff --git a/dataset1/GQovMnlakAAqvkY.jpg b/dataset1/GQovMnlakAAqvkY.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0d4789e0353f34c41792b42241fa72b724a6dc57
--- /dev/null
+++ b/dataset1/GQovMnlakAAqvkY.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:47a14aca29d0b2e2d8af42942ae1456baf6382f46ecf9114f8a8c49a3b8cc32c
+size 375307
diff --git a/dataset1/GQowaszakAANNG4.jpg b/dataset1/GQowaszakAANNG4.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..a147f8c3334f53c247c8b91003bbcf5a8ec9b239
--- /dev/null
+++ b/dataset1/GQowaszakAANNG4.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0f49bf182b320c3e703e0ebe4b421c9f241670b45b55dd863a56cef17270550b
+size 235390
diff --git a/dataset1/GQr70ECaoAA55ns.jpg b/dataset1/GQr70ECaoAA55ns.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..027047adc64684b9bb5390b035de2fbc24508a33
--- /dev/null
+++ b/dataset1/GQr70ECaoAA55ns.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8eee7ce5b5ca7f0615a6400e13b98b43ecfb3e4e9675e03bb8e353cefb52e7eb
+size 216479
diff --git a/dataset1/GQr70EDaEAAIwko.jpg b/dataset1/GQr70EDaEAAIwko.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..2b116d70cec2bc9e01b0103ba9c08f26748b8953
--- /dev/null
+++ b/dataset1/GQr70EDaEAAIwko.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bf5489bd8cfdf0bfb72c14d8e415f7b4f2058af4c71a58f3f62241c37e087c20
+size 234996
diff --git a/dataset1/GQrL_p4aoAAAkPS.jpg b/dataset1/GQrL_p4aoAAAkPS.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..d5f4dd7aa90aef95cc1766242eba3427370333b3
--- /dev/null
+++ b/dataset1/GQrL_p4aoAAAkPS.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:200d3a6c221c8208ed3ba16b1c3cbd2a5eae0ce384555b15b0c76bfd5bc279c2
+size 366636
diff --git a/dataset1/GQrL_p4bkAAg5-5.jpg b/dataset1/GQrL_p4bkAAg5-5.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..e80104923e72512210dc747982720ded5f4193bd
--- /dev/null
+++ b/dataset1/GQrL_p4bkAAg5-5.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8cf3b789559458fdf5a24a740f56dc81d39c6ba9e1bac69e1396424c6d9d09f8
+size 375730
diff --git a/dataset1/GQrO9HcbcAA93El.jpg b/dataset1/GQrO9HcbcAA93El.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..bd1a4c9c844592c0303a4714bdcf5747f0225d86
--- /dev/null
+++ b/dataset1/GQrO9HcbcAA93El.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:05f5f0b7a29ba3dd3f7fa816450f485e0b771930be21a9316b0279e78e4352c4
+size 1251984
diff --git a/dataset1/GQsVgQrasAAACy7.jpg b/dataset1/GQsVgQrasAAACy7.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..56f8229c947cbb1d53331feea38b9c2804fee77d
--- /dev/null
+++ b/dataset1/GQsVgQrasAAACy7.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:614e1d1c459c639aefb0ef2927215d8ffbd299813e097f099043abbcddca329b
+size 765696
diff --git a/dataset1/GQsYL08aQAAkEKQ.jpg b/dataset1/GQsYL08aQAAkEKQ.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..eeec27bc257a4c27977bddb9cd2e40ce03d505da
--- /dev/null
+++ b/dataset1/GQsYL08aQAAkEKQ.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1f1122af705910c3ccfaf4f683016f302edb8a4f30f658ed1a8f32bfefbadf0e
+size 149437
diff --git a/dataset1/GQzpIFfbkAAfWd7.jpg b/dataset1/GQzpIFfbkAAfWd7.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ba96def0e733509304f435f5adfbbe6348c04ea2
--- /dev/null
+++ b/dataset1/GQzpIFfbkAAfWd7.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f377912b72bc02dc1162931557cb0abc1b0a943c4f5d474ea1c5363ad332fda3
+size 506650
diff --git a/dataset1/GR-5HVqbAAAfjOG.jpg b/dataset1/GR-5HVqbAAAfjOG.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9aa32da87211f4eaaa1dc2013c1d10c1fa05c156
--- /dev/null
+++ b/dataset1/GR-5HVqbAAAfjOG.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b7b6e94e2f2b32af989b3ff792f0757c43f3ac7de7c8901c1c89a81b40a0b7e1
+size 160689
diff --git a/dataset1/GR-5UDGaMAcodkX.jpg b/dataset1/GR-5UDGaMAcodkX.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..5e7dc38a6583880471576889db093aec2da0be02
--- /dev/null
+++ b/dataset1/GR-5UDGaMAcodkX.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:78c892da5fc4eedf19199dd0763d9da50f8b0336331dc51e878f773a4e3f70ae
+size 156705
diff --git a/dataset1/GR-5UptaMAMZehr.jpg b/dataset1/GR-5UptaMAMZehr.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6f65d5907a5cf6eece1baf2062fcec9e61898141
--- /dev/null
+++ b/dataset1/GR-5UptaMAMZehr.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2d8281c980c65c74d235ce18949ee692bd09af92dd337b37a8fb8dd7ce323e06
+size 166196
diff --git a/dataset1/GRF9Z5iaIAAco8h.jpg b/dataset1/GRF9Z5iaIAAco8h.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..1ca20830fd3e928647df42fa63d48f14073768a5
--- /dev/null
+++ b/dataset1/GRF9Z5iaIAAco8h.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c506bb15c601b31b43aabe3a9ca89196fd67650d225fdec8c5f8ce6b377453b4
+size 924302
diff --git a/dataset1/GRFJ9huaYAAwKYn.jpg b/dataset1/GRFJ9huaYAAwKYn.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0807327208ab47a46eea8e8fe8a8d50556ee0591
--- /dev/null
+++ b/dataset1/GRFJ9huaYAAwKYn.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6e0cd4ac5435eb39e66c482c8b304dc82316b61594d28aae82ff4cd033016278
+size 522779
diff --git a/dataset1/GRFW1vybEAANkXM.jpg b/dataset1/GRFW1vybEAANkXM.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..4c324da34284c58b3d7acf3d04580cf2c9d469be
--- /dev/null
+++ b/dataset1/GRFW1vybEAANkXM.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:49595caa30bfaef33bfe2a94f773d781c9a0d3c67ad5614a16f292633007debf
+size 391712
diff --git a/dataset1/GRFW1vzaMAAsoF0.jpg b/dataset1/GRFW1vzaMAAsoF0.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..b9b14919180ac34fcc2df5f97b051ea90bf27dbb
--- /dev/null
+++ b/dataset1/GRFW1vzaMAAsoF0.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8debe062f76e19195573a607a558bb2afde2645e133c00dc2e8b25b640bce96d
+size 278050
diff --git a/dataset1/GRIpKS9bUAAFqf5.jpg b/dataset1/GRIpKS9bUAAFqf5.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9419ad3925ecfc0ee353072144c40538a4473055
--- /dev/null
+++ b/dataset1/GRIpKS9bUAAFqf5.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1f8c435f642b22b566a3ead5dd23afd0982459f88008c0a614eb59f1c6636d61
+size 265415
diff --git a/dataset1/GRK9SEobsAA1-zE.jpg b/dataset1/GRK9SEobsAA1-zE.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..416d3dd18fff27006f23e2748b0b7eadbaabd040
--- /dev/null
+++ b/dataset1/GRK9SEobsAA1-zE.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ec279b475e3144e7ddae46fcc65944709c1f224a55d5c3e397329edb95092ee9
+size 589941
diff --git a/dataset1/GRaWilMa4AAiRXt.jpg b/dataset1/GRaWilMa4AAiRXt.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..02630d96a7ad5308a1cbde44def5cdb26ad5d6c3
--- /dev/null
+++ b/dataset1/GRaWilMa4AAiRXt.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9e6e55a7a00f59255c7b47262c397176dbb3c737f79b34b8ddbbf8f3b8fdaff0
+size 598169
diff --git a/dataset1/GRj0dAAa4AA_LkS.jpg b/dataset1/GRj0dAAa4AA_LkS.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..3b0c33b63d6b781e0191d463315f96b9e15fd7c9
Binary files /dev/null and b/dataset1/GRj0dAAa4AA_LkS.jpg differ
diff --git a/dataset1/GRjk9SdbMAA7raK.jpg b/dataset1/GRjk9SdbMAA7raK.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..b221088def055f6037520a292a0f4092c453fd5f
--- /dev/null
+++ b/dataset1/GRjk9SdbMAA7raK.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8ed97e7c4b7dae987679ac704d4f241d08201567a1368102a709ebba1b93daf7
+size 270572
diff --git a/dataset1/GRkC4pGbMAAhh93.jpg b/dataset1/GRkC4pGbMAAhh93.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6a9bc1822e3487baf3c804b5fd8ab0f2dfd62a9a
--- /dev/null
+++ b/dataset1/GRkC4pGbMAAhh93.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a980cc0618be3fcf22844e57aae962672a798916d1d822181b478bc7c34de6c8
+size 350168
diff --git a/dataset1/GRketotaIAA7wmP.jpg b/dataset1/GRketotaIAA7wmP.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..c59b2ae8a730a870e37dd5e5e5bed0f054e37019
--- /dev/null
+++ b/dataset1/GRketotaIAA7wmP.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c7c951bd06f61d7094437a942f4522afa8a6b7d1bb9fb1269c1a0325b2b57002
+size 444101
diff --git a/dataset1/GRketoxaYAAp8nv.jpg b/dataset1/GRketoxaYAAp8nv.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..e7e975984e14672339fa00ce7ab54b98a38528df
--- /dev/null
+++ b/dataset1/GRketoxaYAAp8nv.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:33aa863b89aa920ec38382caa62c4574d8448cd675db45c51b5643760f3c1b3d
+size 326685
diff --git a/dataset1/GVHZuDaaQAAdr5U.jpg b/dataset1/GVHZuDaaQAAdr5U.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..b670008e0fba9d5a6c91c71bf098e9e6140a5acf
--- /dev/null
+++ b/dataset1/GVHZuDaaQAAdr5U.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b43a6fbb67332643f28b3b2b816de784bdd0dcad5b0e1002061b5af51d24e619
+size 864809
diff --git a/dataset1/GVIHTy2aEAMb04n.jpg b/dataset1/GVIHTy2aEAMb04n.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..d86f1ec0265e041012e72c7ffb64b785b8ca90bc
--- /dev/null
+++ b/dataset1/GVIHTy2aEAMb04n.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:144b19d1930be732c405911ce5e090489f739999a34b9c778eb2e00bb09a69de
+size 130985
diff --git a/dataset1/GVII87raEAMIEpU.jpg b/dataset1/GVII87raEAMIEpU.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..66cb114cf9aee549c3701eb238b59e753399ceee
--- /dev/null
+++ b/dataset1/GVII87raEAMIEpU.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f0e673c1612abf152b16c35cf223c14e75c237dddd97cdf4ef09ac3b2c99ee34
+size 111433
diff --git a/dataset1/GVISU10aEAAxcFl.jpg b/dataset1/GVISU10aEAAxcFl.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9b74fb58d31501206cc7cb9e84fe88b11491be07
--- /dev/null
+++ b/dataset1/GVISU10aEAAxcFl.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e58f5869c45f46978c38c586083c837fe5ab3f4a10e7104fb98c16a0d83628b2
+size 494600
diff --git a/dataset1/GVISU10aEAQa-L3.jpg b/dataset1/GVISU10aEAQa-L3.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..7c0e23666e94b7cd7afc0f914cebac3cc3efa7d7
--- /dev/null
+++ b/dataset1/GVISU10aEAQa-L3.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7203c764a78a371323ac7f7657a7fb790182a7fb32e75bc2c21531edac12bc93
+size 470675
diff --git a/dataset1/GVISU1zaEAYE8UE.jpg b/dataset1/GVISU1zaEAYE8UE.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..c472ae2ea65b62198a847ab3e0bf4055ac5ea3dc
--- /dev/null
+++ b/dataset1/GVISU1zaEAYE8UE.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:479ceb0effe18cd80f313e2793b8683800641d29aa51dd8c69ab23c8cc30adb6
+size 471156
diff --git a/dataset1/GVISU1zbsAAivBr.jpg b/dataset1/GVISU1zbsAAivBr.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..319b8546d89ab38fc78051526a8ecd46732ece80
--- /dev/null
+++ b/dataset1/GVISU1zbsAAivBr.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8caab10ac79418bf5784ddeb9be5272de137d123368b7c20d45a4b7f47ff9c8c
+size 502343
diff --git a/dataset1/GVJMMs3awAA8AEI.jpg b/dataset1/GVJMMs3awAA8AEI.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..bfce0c6c5b055ea5392e819e37d2b7e77fc9ea6d
Binary files /dev/null and b/dataset1/GVJMMs3awAA8AEI.jpg differ
diff --git a/dataset1/GVJ_s7GaEAMeQ1q.jpg b/dataset1/GVJ_s7GaEAMeQ1q.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..3fd068205f7f432dee249f56aff94a05deeb2abd
--- /dev/null
+++ b/dataset1/GVJ_s7GaEAMeQ1q.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:52cee62a968bd6c4d48eefdd9189dc01d47681cf3d57f275ecc8cdc5bb7922d8
+size 839838
diff --git a/dataset1/GVKsrCwbwAACV2o.jpg b/dataset1/GVKsrCwbwAACV2o.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..bb5fac8b80cc7061e4d2c5955b1b128f9c714f56
--- /dev/null
+++ b/dataset1/GVKsrCwbwAACV2o.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8d34c1246589350b15cbc59ab3cdce92b13d3afb3426cd4d29682e4df2d84e6c
+size 367235
diff --git a/dataset1/GVKtsl8aEAExpW6.jpg b/dataset1/GVKtsl8aEAExpW6.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..f451e4501a9abb967a1da7e334e54d30e6093439
--- /dev/null
+++ b/dataset1/GVKtsl8aEAExpW6.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a0cdfc1c5e80818941875a83787e915f10586e5821f69381182fccdd8c88d4de
+size 667103
diff --git a/dataset1/GVKu__saEAEwEL0.png b/dataset1/GVKu__saEAEwEL0.png
new file mode 100644
index 0000000000000000000000000000000000000000..cf35c4c40a972c938fba96778288d79ae264de5b
--- /dev/null
+++ b/dataset1/GVKu__saEAEwEL0.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:26e68c2a9fb69e0377b51d6f29c2be3da775c34d7555a1464877edd940c8fc60
+size 172558
diff --git a/dataset1/GVL-JIFbQAEoIzU.jpg b/dataset1/GVL-JIFbQAEoIzU.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..e104bd7b39cb9c788e02d3f4168edb157007b7d8
Binary files /dev/null and b/dataset1/GVL-JIFbQAEoIzU.jpg differ
diff --git a/dataset1/GVL3b3ybAAA1sw9.png b/dataset1/GVL3b3ybAAA1sw9.png
new file mode 100644
index 0000000000000000000000000000000000000000..053e517bf720d46e686576bd2c2795e7e4885e36
--- /dev/null
+++ b/dataset1/GVL3b3ybAAA1sw9.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2e54dfe709eccbd99069748b2f235f19b8d35063fdbef29d53aa688df1f05a21
+size 165825
diff --git a/dataset1/GVLfJTzaQAAyqUN.jpg b/dataset1/GVLfJTzaQAAyqUN.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..688c1dcd1e9dfc4e41acde0673ed9a649707cb4c
--- /dev/null
+++ b/dataset1/GVLfJTzaQAAyqUN.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4e579368e4a8ea3508b2f5d03c340f6ccceaf040e7af219b3eff5011ac19dd1c
+size 990876
diff --git a/dataset1/GVMRSfSaQAAGsWr.jpg b/dataset1/GVMRSfSaQAAGsWr.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..f893f1a3d7da97485c88cec4ec9041087b488252
--- /dev/null
+++ b/dataset1/GVMRSfSaQAAGsWr.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:41da47db44058e4ec9052748a381e33e265de23586fcdce702c88e84f56f6174
+size 616738
diff --git a/dataset1/GVNMBpTacAEk-sq.jpg b/dataset1/GVNMBpTacAEk-sq.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..bbf67e72a37bf657db8ef17c285ce7282e6f76f7
--- /dev/null
+++ b/dataset1/GVNMBpTacAEk-sq.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b7099abe7b14b832dc7b2505f7c51bac9ad67786332caabf59b6df2c56e7674a
+size 868018
diff --git a/dataset1/GVPGfQ5a0AAI4kr.jpg b/dataset1/GVPGfQ5a0AAI4kr.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..47b920109d3932f848a83bb66eaff4e0c2b9a685
--- /dev/null
+++ b/dataset1/GVPGfQ5a0AAI4kr.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5ecbe819c253950312c9fa9148404e3933d012fc234cb7359e51a961e4ec48e0
+size 783049
diff --git a/dataset1/GVPkZjYagAAr7b8.jpg b/dataset1/GVPkZjYagAAr7b8.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..54b12c3dddb466c6d32e1bc748b5d85ff2b02ffe
--- /dev/null
+++ b/dataset1/GVPkZjYagAAr7b8.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5bf4d5908437335b57b09885b64c1df8af1e2f8701c3eba6e7b73e11526cee85
+size 1071604
diff --git a/dataset1/GVQ4_coa0AAVeU3.jpg b/dataset1/GVQ4_coa0AAVeU3.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..fcb9fb7c4ad44cae15570d302a62b24f58855c14
--- /dev/null
+++ b/dataset1/GVQ4_coa0AAVeU3.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4ba6d9b3ffede9d2f5ff29319933429bb499d5bb49f17933b16dfe4f2f2776ba
+size 161318
diff --git a/dataset1/GVQ7m6na4AAe2to.jpg b/dataset1/GVQ7m6na4AAe2to.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..c822993538263f3f6af49101890a68c64ec0c610
--- /dev/null
+++ b/dataset1/GVQ7m6na4AAe2to.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:653aa74c35b824e712cdfc5e7be1409aabe878d37af36f8a7f40581573759542
+size 172869
diff --git a/dataset1/GVQZvaCa0AAWhUU.jpg b/dataset1/GVQZvaCa0AAWhUU.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9437c0073801380f14971542b1ac55a45dfdc07f
--- /dev/null
+++ b/dataset1/GVQZvaCa0AAWhUU.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:538467fab07d6b7c42b82c27707553feb49762bc566904e37bff4d18fcee5ea7
+size 250815
diff --git a/dataset1/GVRg_-3akAAr4Qn.jpg b/dataset1/GVRg_-3akAAr4Qn.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..83eff0a8305cace9ff5fcf606dc8d41a367eb717
--- /dev/null
+++ b/dataset1/GVRg_-3akAAr4Qn.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3de70fcf22c3e1153bbefbf974a299f5a8b70f6a735ffbc519ab28b06ba890bd
+size 688004
diff --git a/dataset1/GVUTBxjagAATzSg.jpg b/dataset1/GVUTBxjagAATzSg.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6a0d40d14a4b2252409467504bf373a519cf2bef
--- /dev/null
+++ b/dataset1/GVUTBxjagAATzSg.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fd240b175417eca9055c2a1eb641d39fe5d7c05c944be9ab9a0dd8cb357961c3
+size 671745
diff --git a/dataset1/GVUTBxkaIAAHfoo.jpg b/dataset1/GVUTBxkaIAAHfoo.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..085a3d0388584d2cf1d4b55b102cba7bdde0f63f
--- /dev/null
+++ b/dataset1/GVUTBxkaIAAHfoo.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:09d327b5b6d0bf10edc8c8dd6a22730670b9a8809800cfc7485ea9c47730d935
+size 643912
diff --git a/dataset1/GVUeZmZbgAAa7WV.jpg b/dataset1/GVUeZmZbgAAa7WV.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ab90b3ebce35eeacbce7bc1f1600f9d81a17db91
--- /dev/null
+++ b/dataset1/GVUeZmZbgAAa7WV.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5f6c03009f81346fb1bacda6ce38522d69a936741a6b735785d492302978267e
+size 305204
diff --git a/dataset1/GVUmXG5aAAAI5mj.jpg b/dataset1/GVUmXG5aAAAI5mj.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..55e5edcb2e4e6905d04d25e80e61a2ed6029433b
--- /dev/null
+++ b/dataset1/GVUmXG5aAAAI5mj.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0e4c7a006013cfb2a7fb781399337230cf92ca2a028576a2cd1eb619357d846a
+size 532149
diff --git a/dataset1/GVUxwGcagAA_CrY.jpg b/dataset1/GVUxwGcagAA_CrY.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..943e280abfd150c502a7c8907251b391a502d61a
--- /dev/null
+++ b/dataset1/GVUxwGcagAA_CrY.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:118ff96b6f81becaa123780f8491e982d42038aa45a02b7466df745a30b0dced
+size 728058
diff --git a/dataset1/GVWDChVaAAEtIsE.jpg b/dataset1/GVWDChVaAAEtIsE.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..2462b9aa742cb50630914c9ba7856f535f60abc4
--- /dev/null
+++ b/dataset1/GVWDChVaAAEtIsE.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:74ece01a6fc61cd98e7e47443c9759e4688b1b4dea7b56735cbfea2a58711779
+size 397214
diff --git a/dataset1/GVZ2LnyaMAQ2O1c.jpg b/dataset1/GVZ2LnyaMAQ2O1c.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ede39be5de501d64a6ed5ad0130928764af572d8
--- /dev/null
+++ b/dataset1/GVZ2LnyaMAQ2O1c.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:001e4029314f4f416909f83102ac222fcd34185d62ee23c271dea0698341b169
+size 169650
diff --git a/dataset1/GVlsrAybgAc5Egl.jpg b/dataset1/GVlsrAybgAc5Egl.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..99a1f729d3e85707d3983219b54372fbb8ce14b6
--- /dev/null
+++ b/dataset1/GVlsrAybgAc5Egl.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3328976d61c7f44bd77e8f6ab386886726cd2addcdb929cbae2af15d26686b21
+size 129424
diff --git a/dataset1/GVltsJGbMAA95m8.jpg b/dataset1/GVltsJGbMAA95m8.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9ad22eb574e138fb3969faacd830f3470859f4b5
--- /dev/null
+++ b/dataset1/GVltsJGbMAA95m8.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6a1af549e8645808d48998000773ee630f7244a4cd8d876a35d2d53a3efc16f3
+size 145947
diff --git a/dataset1/GVm90eaaAAAaeEZ.jpg b/dataset1/GVm90eaaAAAaeEZ.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..28ecdfe2b9483a0717784677cc2456633814f9d5
--- /dev/null
+++ b/dataset1/GVm90eaaAAAaeEZ.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4a75efc286710e2117af2745b62becc27c14f01aa33d25b2d0e04dcc8b75d7fb
+size 634932
diff --git a/dataset1/GVmYBldbgAETp4o.jpg b/dataset1/GVmYBldbgAETp4o.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..5aa4d730c437ede7bd04464fcd8d2d1d8f6a36db
--- /dev/null
+++ b/dataset1/GVmYBldbgAETp4o.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f617cc62b3e128aa4b852710f751a58ed61c28d35e0d5232630980eb6cd194c1
+size 301315
diff --git a/dataset1/GVmYKfZbgAApil_.jpg b/dataset1/GVmYKfZbgAApil_.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..088953fd35212e5b0bdc611b42f89bc61d455e6a
--- /dev/null
+++ b/dataset1/GVmYKfZbgAApil_.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d8205497e25d9a5339b1b0ebd2462a996510417555b7ea3e7ac9d773c8815e22
+size 304479
diff --git a/dataset1/GVpRMq-XQAAHaiX.jpg b/dataset1/GVpRMq-XQAAHaiX.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..525ac8c0c0da75cf82bb15486ee0abe6113a22ab
--- /dev/null
+++ b/dataset1/GVpRMq-XQAAHaiX.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d44c320a9a1d0f958447972219c0b2466d10ba7b6ba0ab3e3f25c17da7d2bb7d
+size 526113
diff --git a/dataset1/GVphWn9bgAEnuGP.jpg b/dataset1/GVphWn9bgAEnuGP.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0eae71379965ae7762fd6793266147537dd462ff
--- /dev/null
+++ b/dataset1/GVphWn9bgAEnuGP.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:93aedfaadf393708cb375a3cdb3cbc19396a9a2c8c5b7cd559398d5c506cc683
+size 111857
diff --git a/dataset1/GVqMWwdXQAAIbUX.jpg b/dataset1/GVqMWwdXQAAIbUX.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..87e303b759f3d73dcaf9d26da3b59fe8ec72ad1e
--- /dev/null
+++ b/dataset1/GVqMWwdXQAAIbUX.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:49c577ac5dec27b59b81b41bb59a8197c695b245f30050b9b7a3dc5edc297c25
+size 339355
diff --git a/dataset1/GVqMXWubQAAy8iO.jpg b/dataset1/GVqMXWubQAAy8iO.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..a959682b28788e8f2435d431062590108aaccb00
--- /dev/null
+++ b/dataset1/GVqMXWubQAAy8iO.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7f8479e52b07496f007f3d3cd8df1a3b343dc208adcb67fc92ada82f653109dc
+size 360657
diff --git a/dataset1/GVqP6xkbwAAMbex.jpg b/dataset1/GVqP6xkbwAAMbex.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..a4d7fba9de9d6bb6ed28568a0faa8874f1531ac1
--- /dev/null
+++ b/dataset1/GVqP6xkbwAAMbex.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a8bdc592fdcb97a102ec9df587f81d1d57de1aa3aed4bd2499cbba33d0a62fde
+size 1289435
diff --git a/dataset1/GVuiaXua8AggvT9.jpg b/dataset1/GVuiaXua8AggvT9.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..66b0345ee862de35e3d8e06da2ddc76f8397b459
--- /dev/null
+++ b/dataset1/GVuiaXua8AggvT9.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:33996efa49bc09a4121919b2f4a072b3c60686a7f787c835c30da1825cfb2ec2
+size 1109939
diff --git a/dataset1/GVwPJttbMAA0teL.jpg b/dataset1/GVwPJttbMAA0teL.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..594a257a90bfd0ab7b6996ede6f97e530f9949b8
--- /dev/null
+++ b/dataset1/GVwPJttbMAA0teL.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8cb77ba73148cd5a7268d2a9276459517dfb3ad1aa5191f66f5328355da16992
+size 143945
diff --git a/dataset1/GVyhF8sWEAA6kDP.jpg b/dataset1/GVyhF8sWEAA6kDP.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..fc77ed35fce6c4e3a5e2c0815f44c2b4e5f9fe84
--- /dev/null
+++ b/dataset1/GVyhF8sWEAA6kDP.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c05140b24f81dbc1effa2605189f5661512d8b7a90a0b446841904e1ca4f7c12
+size 211330
diff --git a/dataset1/GW1P-CBXQAIOW7y.jpg b/dataset1/GW1P-CBXQAIOW7y.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..48e44df6e7ab3ba9ede1b5d395042a3852712a1b
--- /dev/null
+++ b/dataset1/GW1P-CBXQAIOW7y.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:31d72d9cfd5a90cf658a2a7b3b272853cb99cbd866479888130210480b306a9b
+size 163194
diff --git a/dataset1/GW2O8aFa8AEMUZ7.jpg b/dataset1/GW2O8aFa8AEMUZ7.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..8ea5e5674f94d887d41a7119db8b3f103f3dc866
--- /dev/null
+++ b/dataset1/GW2O8aFa8AEMUZ7.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9006019d06ee2ce143f2df941ab4553ffb5e6603bf1b25c97e14d641b40fc936
+size 276453
diff --git a/dataset1/GW2OTC_aUAAmmhf.jpg b/dataset1/GW2OTC_aUAAmmhf.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..2c81528e2f30206dba5b1ca3f8aaa525483b085b
--- /dev/null
+++ b/dataset1/GW2OTC_aUAAmmhf.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:653d7676d7eeae6f24a3b6a08f940109f464025219abd5f632296f67a1d98e07
+size 199724
diff --git a/dataset1/GW7PejFbYAAsXXK.jpg b/dataset1/GW7PejFbYAAsXXK.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..74ef250278db57e7ca5b2a6588f08856b6a3ff1a
--- /dev/null
+++ b/dataset1/GW7PejFbYAAsXXK.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b841e143f0171f1acbc090fa288b22ea4be7c1e81647a94b57e9ccc6da381cf7
+size 268636
diff --git a/dataset1/GW8KrLfbcAAsG42.jpg b/dataset1/GW8KrLfbcAAsG42.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..18e8087cea86e806948da468d3ae64fd4374d3d2
--- /dev/null
+++ b/dataset1/GW8KrLfbcAAsG42.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:23cf74d938dfb20f56be68f0d07405ebc54ddff50838882ad6195598385d3fd6
+size 228700
diff --git a/dataset1/GW8kLr2bcAASJsg.jpg b/dataset1/GW8kLr2bcAASJsg.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..7dff5b74ba7f1f1f6c554c48830fa50253b00fbf
--- /dev/null
+++ b/dataset1/GW8kLr2bcAASJsg.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bfce25c5c584f5a8d216062ac5368232d560089c4e5e8aa05f2ecc4de39e7d08
+size 129933
diff --git a/dataset1/GW8tHQBa0AAImgY.jpg b/dataset1/GW8tHQBa0AAImgY.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..4f794347f31df7829e02284d8c684264dc570855
--- /dev/null
+++ b/dataset1/GW8tHQBa0AAImgY.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d9adb1a33f8d9e371fa69665518ed134cdab5a62795b06c9d8c7a84a2670986a
+size 401989
diff --git a/dataset1/GWDw1CmaEAAnRN4.jpg b/dataset1/GWDw1CmaEAAnRN4.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..a8db0c5e0254205681c8e11fce1c6be4f056e5a0
--- /dev/null
+++ b/dataset1/GWDw1CmaEAAnRN4.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0c4577d312db3d295e36621f6dc90ac36bea563dc19e444679f647e849244f13
+size 116630
diff --git a/dataset1/GWOTiNMaMAALMvd.jpg b/dataset1/GWOTiNMaMAALMvd.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..65c975e0812592812a00b46f8915f73568ef7a29
--- /dev/null
+++ b/dataset1/GWOTiNMaMAALMvd.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:775e6aebe7836a28a81d0b7cf3b212798d658c67f4158f3c468e0bcb729a385f
+size 246503
diff --git a/dataset1/GWS1o1RWIAA0E5q.jpg b/dataset1/GWS1o1RWIAA0E5q.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..8d3a312cbc5dc39816bfd781384ffc6edbcb1cd7
Binary files /dev/null and b/dataset1/GWS1o1RWIAA0E5q.jpg differ
diff --git a/dataset1/GWSoLEdacAAdPMP.jpg b/dataset1/GWSoLEdacAAdPMP.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..5116b60aa2ef90808946e5fb4a6924f9876feaf8
--- /dev/null
+++ b/dataset1/GWSoLEdacAAdPMP.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:41db7dbc4e08ebf56764b635a7b747a5f274e55a49156008f1acfb6ba5f641c6
+size 627940
diff --git a/dataset1/GWTihlibQAEqRny.jpg b/dataset1/GWTihlibQAEqRny.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..d2fbe119816241b3509f77af4b8eb22294e25c05
Binary files /dev/null and b/dataset1/GWTihlibQAEqRny.jpg differ
diff --git a/dataset1/GWWwEdcaQAAs_nn.jpg b/dataset1/GWWwEdcaQAAs_nn.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..e981d91c8a9b0a7948864ca9af83c25dd608c309
--- /dev/null
+++ b/dataset1/GWWwEdcaQAAs_nn.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4b2cba0a2267b9e6fea0619b848d35cf9a21babb7d065e0e341c1a9dd30296ab
+size 326239
diff --git a/dataset1/GWZJO5NasAAhdDQ.jpg b/dataset1/GWZJO5NasAAhdDQ.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..395cd995da113e5c93befede773c0fde92a82e26
--- /dev/null
+++ b/dataset1/GWZJO5NasAAhdDQ.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3e31117f9aa5fcd07543e616ee543c4fee59f27a2eaa960cb3e8175ff539fde8
+size 256012
diff --git a/dataset1/GW_ctsYbMAAPpTg.jpg b/dataset1/GW_ctsYbMAAPpTg.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..f3b6426f8a7a3dba1643cd9f9797723feaa04e92
--- /dev/null
+++ b/dataset1/GW_ctsYbMAAPpTg.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c11be2048ff8855e035aae3cb69e47d06841579d2ca5a186f8ff3676aab97cfb
+size 172240
diff --git a/dataset1/GWbg112bEAAvrI5.jpg b/dataset1/GWbg112bEAAvrI5.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..b5929a287525bcc42859d3918bdea70e7098f2d4
--- /dev/null
+++ b/dataset1/GWbg112bEAAvrI5.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6beefb0db2988a264f3d749eda5b31590f4ef0202c83b4126188eab94d83e170
+size 112573
diff --git a/dataset1/GWd-hXuboAArvmT.jpg b/dataset1/GWd-hXuboAArvmT.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..35ac5ef5d63d6f3561bf59da2e7923af33eb17a4
--- /dev/null
+++ b/dataset1/GWd-hXuboAArvmT.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:480e7d1e7517cda8f44f052eeaff4dc492aebb8b409f2865ab6a453504ac22ca
+size 213406
diff --git a/dataset1/GWdgFREbkAAb0qX.jpg b/dataset1/GWdgFREbkAAb0qX.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..e7efdc1808e6e98f8ec046e93b234b5ea1956803
--- /dev/null
+++ b/dataset1/GWdgFREbkAAb0qX.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:47fbd767437f13c90489b2919f7978998e10b748141b586993c2ab568c6c67b2
+size 1221310
diff --git a/dataset1/GWfpZDjbIAAfQs9.jpg b/dataset1/GWfpZDjbIAAfQs9.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9d3cf2e3333c044bf79861cd7b6ef00f9b5d9873
--- /dev/null
+++ b/dataset1/GWfpZDjbIAAfQs9.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:083ca03470e4b289a1cd033250cbff7555c69162b2a1e4cf8dc5a2ebf20dffef
+size 733316
diff --git a/dataset1/GWiKRPgbgAA3kgY.jpg b/dataset1/GWiKRPgbgAA3kgY.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6297ab0d358575b5b00f1b2adf60358f10114490
--- /dev/null
+++ b/dataset1/GWiKRPgbgAA3kgY.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:69b15ee4ebddc6099545449abc07240aa2351667ade340837ec969aaf758cc3c
+size 803268
diff --git a/dataset1/GWmkWu9bMAAYmHq.jpg b/dataset1/GWmkWu9bMAAYmHq.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..e43af692f26d4df99b7137e1d42790dc4bebe8fa
--- /dev/null
+++ b/dataset1/GWmkWu9bMAAYmHq.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:510c26fb278e7d80abea851a2736aa2a22a1201a118fd7766ee75db5105413a2
+size 302100
diff --git a/dataset1/GWoEZkWaAAAAUrs.jpg b/dataset1/GWoEZkWaAAAAUrs.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0dbb10dae9e6c3481aa6997fc2cee29b64da8c62
Binary files /dev/null and b/dataset1/GWoEZkWaAAAAUrs.jpg differ
diff --git a/dataset1/GWoH5ylakAArz-n.jpg b/dataset1/GWoH5ylakAArz-n.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..e7f192a1a691c8f574fc9256b2c646e6903ffd00
--- /dev/null
+++ b/dataset1/GWoH5ylakAArz-n.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9199608284a943445d855945494f903f240ccaab1a21e020d393390b57bfa066
+size 317187
diff --git a/dataset1/GWpBf6xXgAAIwOr.jpg b/dataset1/GWpBf6xXgAAIwOr.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..7249bedf5a8ebc872ac644417c0a1870ddf9a330
--- /dev/null
+++ b/dataset1/GWpBf6xXgAAIwOr.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2254e2dc491b8985eccbcaef88709659483764f97b6cfb4a404adf664c37e6d8
+size 181591
diff --git a/dataset1/GWsMmxya8AMTFdu.jpg b/dataset1/GWsMmxya8AMTFdu.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..636b891e64d395b066078422432f5b4dcdc3c5b0
--- /dev/null
+++ b/dataset1/GWsMmxya8AMTFdu.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cfe98a415a98ff399cbc5cc10195cd369bd01be0b6820972dd5e94810117dd2c
+size 112510
diff --git a/dataset1/GWvVC1BWkAAbeE5.jpg b/dataset1/GWvVC1BWkAAbeE5.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6c567fb11903ed8428683d3a022c3cdccb3b50c0
--- /dev/null
+++ b/dataset1/GWvVC1BWkAAbeE5.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2f63abeeecfd92fddb280f23d370fb5b67224d71e8fe7a8952fcd6d34417d757
+size 139242
diff --git a/dataset1/GWw0pnda8AELzGp.jpg b/dataset1/GWw0pnda8AELzGp.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..026034dca0fedf23f7eafbbe104790007a4d3a73
--- /dev/null
+++ b/dataset1/GWw0pnda8AELzGp.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:18bf43c51269d833c020d3bc414e0c9137c8a78f597b01b60db20d25103d634d
+size 1575519
diff --git a/dataset1/GWwmjv4a8AEmrKA.jpg b/dataset1/GWwmjv4a8AEmrKA.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9f7a2a2005af50485d358e413348ce826aaad3f7
--- /dev/null
+++ b/dataset1/GWwmjv4a8AEmrKA.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0f0c78e12ccb718c9a69483bf2cd88c9e2316bf0fdc26bea8a3a419df31f4aef
+size 164157
diff --git a/dataset1/GWy_vLLbAAA1Szc.jpg b/dataset1/GWy_vLLbAAA1Szc.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..daf0d6ff97e81a30b005023eafbce3e2240a9775
--- /dev/null
+++ b/dataset1/GWy_vLLbAAA1Szc.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0aa25c0dca7238a35dd580ed3528c5cca9b929c8cadf2eeece3c63db19760f53
+size 255809
diff --git a/dataset1/GX0CvuNakAAhyoV.jpg b/dataset1/GX0CvuNakAAhyoV.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..1ee866f72c50f39fae3bcb25ed48acdb1f365b8c
--- /dev/null
+++ b/dataset1/GX0CvuNakAAhyoV.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:772b260d02575c55009054697cf2d29907e666381275e111552f52d05a34827a
+size 297638
diff --git a/dataset1/GX0RmBwa4AAI3EQ.jpg b/dataset1/GX0RmBwa4AAI3EQ.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..910d7d8daccff10a392a006a9aff4e1d340d2797
--- /dev/null
+++ b/dataset1/GX0RmBwa4AAI3EQ.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:deabd1a6b4d94099bde996ac2ae75fb9d8e12e53600cf913fc859760e8a19f36
+size 928399
diff --git a/dataset1/GX1IdYyaoAAxdQs.jpg b/dataset1/GX1IdYyaoAAxdQs.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6cce5031811645b4b3813daa0b60d964a056f4fa
--- /dev/null
+++ b/dataset1/GX1IdYyaoAAxdQs.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:662c05720256fb563de216075b35503bdbf51be07c1aadd28fab378a00bfd390
+size 234344
diff --git a/dataset1/GX6KlH6awAAwkjO.jpg b/dataset1/GX6KlH6awAAwkjO.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..94e4ce748c841631b486e8554de8528b2e9897ef
--- /dev/null
+++ b/dataset1/GX6KlH6awAAwkjO.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f2545def1a04cbf989d80222635ba218fed0204882256206fd1de33f148ef126
+size 908373
diff --git a/dataset1/GX6R81GawAAqWa_.jpg b/dataset1/GX6R81GawAAqWa_.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ef1c8c583a9a28b3917e21d05c9c02bd837b21dd
--- /dev/null
+++ b/dataset1/GX6R81GawAAqWa_.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:961432f74050795919598f575582f00a601900a7575d1dc7ea07de2d46749381
+size 824159
diff --git a/dataset1/GXCG440aIAAw8zf.jpg b/dataset1/GXCG440aIAAw8zf.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..552f71d06bf8cc7f1f21306633e2850e25ea979c
--- /dev/null
+++ b/dataset1/GXCG440aIAAw8zf.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ab5a50d7817df5744b73f980ad643ea0e78272584111336495c7541f6f44e606
+size 275825
diff --git a/dataset1/GXJ6hTSbwAAiqWm.png b/dataset1/GXJ6hTSbwAAiqWm.png
new file mode 100644
index 0000000000000000000000000000000000000000..f24c59ec3ec17c6bc0268b33506e31925d746c1c
--- /dev/null
+++ b/dataset1/GXJ6hTSbwAAiqWm.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5681bb2796823c931840aa46a54d425f530951dae18c5f6d58e6c4dd94a7a1eb
+size 475270
diff --git a/dataset1/GXRcTS6bUAAajnm.jpg b/dataset1/GXRcTS6bUAAajnm.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0b3ec09ec6f509fa1831011436000f8ad71b7530
--- /dev/null
+++ b/dataset1/GXRcTS6bUAAajnm.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1282b9dccd0907abb7d7770ab9a43a0d7326d7f18ddcea07c0e5729ac8c581d2
+size 632590
diff --git a/dataset1/GXRcY59bAAA294X.jpg b/dataset1/GXRcY59bAAA294X.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0b3ec09ec6f509fa1831011436000f8ad71b7530
--- /dev/null
+++ b/dataset1/GXRcY59bAAA294X.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1282b9dccd0907abb7d7770ab9a43a0d7326d7f18ddcea07c0e5729ac8c581d2
+size 632590
diff --git a/dataset1/GXSiPEFa8AABK1q.jpg b/dataset1/GXSiPEFa8AABK1q.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..e43dfe89f2e86207374548310132df0e6d0e9eb5
--- /dev/null
+++ b/dataset1/GXSiPEFa8AABK1q.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dbd01f70a2e179d2ffab2946d8d072eca1629865ae02123a807b702d97cd778d
+size 914032
diff --git a/dataset1/GXT04A1bgAA5jYL.jpg b/dataset1/GXT04A1bgAA5jYL.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..e43dfe89f2e86207374548310132df0e6d0e9eb5
--- /dev/null
+++ b/dataset1/GXT04A1bgAA5jYL.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dbd01f70a2e179d2ffab2946d8d072eca1629865ae02123a807b702d97cd778d
+size 914032
diff --git a/dataset1/GXT1CcnbgAEYnp6.jpg b/dataset1/GXT1CcnbgAEYnp6.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..aae6834d64900e7c26f657e71164cb5404447555
--- /dev/null
+++ b/dataset1/GXT1CcnbgAEYnp6.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1f6f79ad72287780b003dc11a12a1461a0d78cf10dbcf0d3dcc62dc42cff06ea
+size 375320
diff --git a/dataset1/GXWR8U4awAAy6gT.jpg b/dataset1/GXWR8U4awAAy6gT.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..59634945ddd5c7195078f509d859c6b5b940c509
--- /dev/null
+++ b/dataset1/GXWR8U4awAAy6gT.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:db2317a2d53ea9b50f7ce2ea500d358f89dc468e08c90a54bb60dc37094a5b1e
+size 278493
diff --git a/dataset1/GXWebOLa0AAfTMa.jpg b/dataset1/GXWebOLa0AAfTMa.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6d32978a4b9acfcaa2dae279d5cee8f3664666e0
--- /dev/null
+++ b/dataset1/GXWebOLa0AAfTMa.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:104753445fbba90a992491dd7328d861b2e2c35364623568563ce35d86218953
+size 844776
diff --git a/dataset1/GX_9Leob0AMqHgM.jpg b/dataset1/GX_9Leob0AMqHgM.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..60f84f446ad5e32ef7de08a9538332264f6af720
--- /dev/null
+++ b/dataset1/GX_9Leob0AMqHgM.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6e4be475293bf96f208243d654d998a1a95b3e026e56a45fd47cc1439fb5a1d9
+size 1154004
diff --git a/dataset1/GX_Rxoxb0AEfw9P.jpg b/dataset1/GX_Rxoxb0AEfw9P.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..55f1d86057bf16a92aeda92bb5ecd4359c22563a
--- /dev/null
+++ b/dataset1/GX_Rxoxb0AEfw9P.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4c8456333922c508e2a4cc41116da294178f417143b9fab2e44ee45c1c79fb2f
+size 226776
diff --git a/dataset1/GXbft2KakAAvmyi.jpg b/dataset1/GXbft2KakAAvmyi.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..e6bfac907e1d405bc229c25690a61a8089a413c6
Binary files /dev/null and b/dataset1/GXbft2KakAAvmyi.jpg differ
diff --git a/dataset1/GXbqoXsbwAAgZ36.jpg b/dataset1/GXbqoXsbwAAgZ36.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..08518114b0d23c3d808c4b4d08c69372d05f0a71
--- /dev/null
+++ b/dataset1/GXbqoXsbwAAgZ36.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e03ed5c207275e22f5966adfc15e842a196c86bf744d3bdba58c7fcd0c5c4474
+size 315934
diff --git a/dataset1/GY-AHlibAAExUwc.jpg b/dataset1/GY-AHlibAAExUwc.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..66d3802db6cd7e9f70123f121bcd96d3c3166f4d
--- /dev/null
+++ b/dataset1/GY-AHlibAAExUwc.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0a961b53e340372d55e801a19d8ebae9ebeab530393192d5c40a2b3942f2cc2e
+size 489954
diff --git a/dataset1/GY-bGyRbAAIGewv.png b/dataset1/GY-bGyRbAAIGewv.png
new file mode 100644
index 0000000000000000000000000000000000000000..ee03b572bb2292b0243389ce927afd8287836877
--- /dev/null
+++ b/dataset1/GY-bGyRbAAIGewv.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:27db2b53ad88e9e47919e9d729b7fa8b0fedf3d75bc231d634d2a5214708d8be
+size 193062
diff --git a/dataset1/GY2ZWwnacAESNXD.jpg b/dataset1/GY2ZWwnacAESNXD.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..5fabea2d76f71f9c8d1cc1a98fc6e55c72c61386
--- /dev/null
+++ b/dataset1/GY2ZWwnacAESNXD.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:956db161b27670d39eba5f5c6a9877da979e4c9e67a1512e9ebe5150dcce0951
+size 381517
diff --git a/dataset1/GY4bMOAaIAAm_-H.jpg b/dataset1/GY4bMOAaIAAm_-H.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..867101be3a31f4a6b246bfd7497354056743c485
--- /dev/null
+++ b/dataset1/GY4bMOAaIAAm_-H.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1e0906597ee265ab488fbd788b0992a1941d2b9c8b0e9ef1305f6c55a3727406
+size 467600
diff --git a/dataset1/GY4r1ygbEAAIUWM.jpg b/dataset1/GY4r1ygbEAAIUWM.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..bdbeaeb2abf75c1f5bc99cf1bfcee47ce273d98e
--- /dev/null
+++ b/dataset1/GY4r1ygbEAAIUWM.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:651faf7fcc1402de3e841f1f221c155975722a5fce6b2842baf965d8d04e84aa
+size 487927
diff --git a/dataset1/GY7KCPbaUAAZ8nL.jpg b/dataset1/GY7KCPbaUAAZ8nL.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..725e5da31e6e0afc0c2e9b4e8fce6b6911124e7f
--- /dev/null
+++ b/dataset1/GY7KCPbaUAAZ8nL.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2906985b771168dc98a28b81c78777bd50cf8ec45699bde57d26f1e229a795bb
+size 996567
diff --git a/dataset1/GY90wPHaMAEwFR5.jpg b/dataset1/GY90wPHaMAEwFR5.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..11da5578fa4d2b2d65f9f2228238d7a307f9b3db
--- /dev/null
+++ b/dataset1/GY90wPHaMAEwFR5.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3133cd07465e81f7633601c4fd4a9d6bc1890789e57614078ebc6cc408a752dc
+size 221111
diff --git a/dataset1/GY9ZxlkaIAAkXHf.jpg b/dataset1/GY9ZxlkaIAAkXHf.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..115a49df5097ed08c96fedf426f81b80c440b973
--- /dev/null
+++ b/dataset1/GY9ZxlkaIAAkXHf.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4581362c02ee771d87df1768c808a1db66c8316001573c1e782a0a9772cdbcc3
+size 540342
diff --git a/dataset1/GYDJ9YGb0AE_AmL.jpg b/dataset1/GYDJ9YGb0AE_AmL.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..f68192bbf09e165e1a1e1ec625d252ae427dcc73
--- /dev/null
+++ b/dataset1/GYDJ9YGb0AE_AmL.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ed689cb17d6fbdfe2725fd3291e02a440513764b88ce470b6095c6d680743f02
+size 767432
diff --git a/dataset1/GYEvYPjb0AEHtdL.jpg b/dataset1/GYEvYPjb0AEHtdL.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..5faffae74b97863a8f41396b3414938ca8cd419b
--- /dev/null
+++ b/dataset1/GYEvYPjb0AEHtdL.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:56f4e23e8a15f88f5aad56ea6678eaa4cdf285d3897342a8ee7d0106ddbe921e
+size 412604
diff --git a/dataset1/GYJcAYnbMAAK4FR.jpg b/dataset1/GYJcAYnbMAAK4FR.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6d385c654adbbed2f5f9a965585453e3e7ec2a61
--- /dev/null
+++ b/dataset1/GYJcAYnbMAAK4FR.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1080315d1a47bf38a5b22a287a284b71263b406dac0ba973661684bb804c8ed2
+size 243282
diff --git a/dataset1/GYKtxTkacAA3HWW.jpg b/dataset1/GYKtxTkacAA3HWW.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0022094c17e3671c7a91f0b0da7bdd92c38f61cc
--- /dev/null
+++ b/dataset1/GYKtxTkacAA3HWW.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cfb1319044d09ccb9b456966a66449a67a6ebed0ff572c33b6005b0a34b1deed
+size 597583
diff --git a/dataset1/GYMmRw9akAAKtH9.jpg b/dataset1/GYMmRw9akAAKtH9.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..818da79525f27bd0dee8f9bc59b1209e464b758f
--- /dev/null
+++ b/dataset1/GYMmRw9akAAKtH9.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:081cde8d9412a89ea9ae39a03329f6ac156b1434628bb16aa94d6cd3f69d13f5
+size 283328
diff --git a/dataset1/GYTSs3MbgAAnBAa.jpg b/dataset1/GYTSs3MbgAAnBAa.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..5370de674effa4a1822a5743ecc8e28a61ed164a
Binary files /dev/null and b/dataset1/GYTSs3MbgAAnBAa.jpg differ
diff --git a/dataset1/GYd_zFAa0AAk8sM.jpg b/dataset1/GYd_zFAa0AAk8sM.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..7ea6668cf16e675add7d5c5b8e56df28b3d760ff
--- /dev/null
+++ b/dataset1/GYd_zFAa0AAk8sM.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2ce9f78e4d04be03cd038bbae200b422dade9f05a8592e91a7ffdb29d07c3ad0
+size 334231
diff --git a/dataset1/GYjugDvasAESsu3.jpg b/dataset1/GYjugDvasAESsu3.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..5224fe1768d2aa29bfbc917cae765d7613ec11dc
--- /dev/null
+++ b/dataset1/GYjugDvasAESsu3.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:12f4aa77c2a9dceb66bc9725061d3cd0e681f198c75ec695399105e3c0095ad8
+size 313769
diff --git a/dataset1/GYoBIXtbYAAsTDz.jpg b/dataset1/GYoBIXtbYAAsTDz.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..4058a3804ee3c310c1ee9cf16cb699fc67d876ca
--- /dev/null
+++ b/dataset1/GYoBIXtbYAAsTDz.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2906ecf2ee357ba75e217cdc1e2db4a6ff7e49197d3b9e33e16ac8d9ea909d31
+size 442540
diff --git a/dataset1/GYpsFLPaMAAOK2d.jpg b/dataset1/GYpsFLPaMAAOK2d.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..a0c9c914f89860c12cfaf7d4bc70fb9c504585c2
--- /dev/null
+++ b/dataset1/GYpsFLPaMAAOK2d.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:59e64d63b2a36b9a7f70ed334d9c7706876888947916a7ba0019b1f5ef6848c8
+size 515852
diff --git a/dataset1/GYtbLkTaIAAeYr7.jpg b/dataset1/GYtbLkTaIAAeYr7.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..a924c573164d937cb9d495f8ffbb3efd43082d43
--- /dev/null
+++ b/dataset1/GYtbLkTaIAAeYr7.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:89bc5451d98290d90128845e3c8328d874084865be51d596eb1c9bbcf7e1a569
+size 609640
diff --git a/dataset1/GYyjLlrbUAAaKYk.jpg b/dataset1/GYyjLlrbUAAaKYk.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..1de30b403b605b683d78202f79aee0f4a4f8624d
--- /dev/null
+++ b/dataset1/GYyjLlrbUAAaKYk.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a62dd9c28ced70d333da43064f1449a234edbe4a0c8e37b6f53bb816ed8f0fdb
+size 312608
diff --git a/dataset1/GYzM5OdbQAEnhLm.jpg b/dataset1/GYzM5OdbQAEnhLm.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..4ad4bab3b46ca8d8f173d75993fe437cd269f175
--- /dev/null
+++ b/dataset1/GYzM5OdbQAEnhLm.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4e13b4bda65a597b2f0e2503f90a26c0b5fd79d2dfc3fb941b12522f4f06651d
+size 521033
diff --git a/dataset1/GZ60z3Yb0AINYLa.jpg b/dataset1/GZ60z3Yb0AINYLa.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..3d40fae36792688d1dc68e602a1424e02d69d58d
--- /dev/null
+++ b/dataset1/GZ60z3Yb0AINYLa.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:83d17797772e77f259a687fbef27cdb5f8483bd7f1f3b9ce9937e882645868aa
+size 167652
diff --git a/dataset1/GZ6QcXKb0AIkRB3.jpg b/dataset1/GZ6QcXKb0AIkRB3.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..5e0ae41dd0f668b3aefbfa84fb46d772888438f3
--- /dev/null
+++ b/dataset1/GZ6QcXKb0AIkRB3.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dc0dfadff79f31f8fd4561cd62e7a4d3c4cbc93ad68e00f044a0cd3f060c7708
+size 435486
diff --git a/dataset1/GZ7sIobb0AMxVei.jpg b/dataset1/GZ7sIobb0AMxVei.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..bd4d304faafeb4a5a0d6ad6d8a1de56cd1bdfe65
--- /dev/null
+++ b/dataset1/GZ7sIobb0AMxVei.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a3e763d35f5ebbec9db3298ddcbe6d4a13ff032eb80efa05c96a0d7d0caf1289
+size 368736
diff --git a/dataset1/GZBjQ-SbAAEmqYp.jpg b/dataset1/GZBjQ-SbAAEmqYp.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0c76a675bf0a1afbf5a665f173a4f99044774f25
--- /dev/null
+++ b/dataset1/GZBjQ-SbAAEmqYp.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6a3692e957f72c7bb5a4ce670b1d222fc958095a0e42516eee6b157d8bd0fe2e
+size 564748
diff --git a/dataset1/GZGfTkGaEAA1_nO.jpg b/dataset1/GZGfTkGaEAA1_nO.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..990c2a7b00288736acae3852508f371c4d49fe1d
--- /dev/null
+++ b/dataset1/GZGfTkGaEAA1_nO.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a965c7e9e300ba925b56b66390d6b9893309adff4175880b801f95af6f9f343b
+size 398903
diff --git a/dataset1/GZGlkBfbkAAAMpy.jpg b/dataset1/GZGlkBfbkAAAMpy.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9f236a7a2de32f273b482933a8a52ebae0bbabe8
--- /dev/null
+++ b/dataset1/GZGlkBfbkAAAMpy.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8e314ffda4c32178ba2f3d94c4d06fada79bfc46bd2ff2795b5b71a7a60c22ff
+size 551769
diff --git a/dataset1/GZGyDm6aIAAyloF.jpg b/dataset1/GZGyDm6aIAAyloF.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..bbe229bab7cdf7fb2f766cc9bb0d1f2d44946b71
--- /dev/null
+++ b/dataset1/GZGyDm6aIAAyloF.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:227b30486921590cc054f60c20e02dada8833f881bed816e827af7d712b8d3a5
+size 387445
diff --git a/dataset1/GZGz7ruaQAADD2P.jpg b/dataset1/GZGz7ruaQAADD2P.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..a2f7eac69ab477b1a9250174b1ab4662a7400351
--- /dev/null
+++ b/dataset1/GZGz7ruaQAADD2P.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:65ced0b54d9c081d4f40203c4d1bf413ed1d9c5c4b379ad201ceceab58a1ca6b
+size 375013
diff --git a/dataset1/GZH77sgaQAAD4x1.jpg b/dataset1/GZH77sgaQAAD4x1.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..32fec66cf702c403b0cad3d8dd133382fbd82a11
--- /dev/null
+++ b/dataset1/GZH77sgaQAAD4x1.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fafca5947f1c55b70dd499ddbade13a04f5fa2ea3cc87262db6dbd727d3b7663
+size 245322
diff --git a/dataset1/GZIRy9Aa0AA8jgW.jpg b/dataset1/GZIRy9Aa0AA8jgW.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..1b0b7994972809a061485b503b43ed200e77b0ad
--- /dev/null
+++ b/dataset1/GZIRy9Aa0AA8jgW.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ea9de8f0ab35ec8cab30ed022e0cadbc33289b3cdc001c20e49b2ac26d9224a0
+size 494217
diff --git a/dataset1/GZKGBItbwAAG8fw.jpg b/dataset1/GZKGBItbwAAG8fw.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6c7598484cfb67a714f7e223dde44e840faa7db7
--- /dev/null
+++ b/dataset1/GZKGBItbwAAG8fw.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7564dcf0bdaf36d0b241cb4d37f6d57c4fe77b545480766a3283dd9dc467f985
+size 1191670
diff --git a/dataset1/GZKHj7NaQAA4DLq.jpg b/dataset1/GZKHj7NaQAA4DLq.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..7c07774f6d77be8940c6ca028d68cf0cc25cab6b
--- /dev/null
+++ b/dataset1/GZKHj7NaQAA4DLq.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d2662bd8bb840386b7e96dcc704ec757fced5dff2e85f6b36e9bff591b3f9f75
+size 268679
diff --git a/dataset1/GZKtOq4bsAAKNzf.jpg b/dataset1/GZKtOq4bsAAKNzf.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..d858ac4c77b949a4f469722dd1cd2daea29ff0a8
--- /dev/null
+++ b/dataset1/GZKtOq4bsAAKNzf.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e694ab6d435203a2c8f06acd5621f77364968adc8a7514444532bcf07a63b6b4
+size 890271
diff --git a/dataset1/GZKyag8XgAAA_S-.jpg b/dataset1/GZKyag8XgAAA_S-.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0f64d873796b58fdc1767dd5b1e2c3b09dd2caf6
--- /dev/null
+++ b/dataset1/GZKyag8XgAAA_S-.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ff5899be19e74509e010ab2dfa0dc7aa3d413cd44bcc4c2ea43e80cc3233a245
+size 412880
diff --git a/dataset1/GZKyag8XgAEJnKw.jpg b/dataset1/GZKyag8XgAEJnKw.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..edec6c4cf619ae525fcd334bc065613254cb86ae
--- /dev/null
+++ b/dataset1/GZKyag8XgAEJnKw.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e34dbf84b89105361a5ae642a0eb3b9073a22b980e3eca7448bb28ac39843a6c
+size 282608
diff --git a/dataset1/GZLpz7Db0AAbx30.jpg b/dataset1/GZLpz7Db0AAbx30.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ca3cc32f689cf70ed2930cfbaa4fef37a5d81439
--- /dev/null
+++ b/dataset1/GZLpz7Db0AAbx30.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d7915755dc72a9c2237142872155c2c0d5d448690075985a027f87256e864f69
+size 544256
diff --git a/dataset1/GZMsWhEaAAAnGT9.jpg b/dataset1/GZMsWhEaAAAnGT9.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0dd05a8fc307a18b934a8c13118f2ba4e4f8d6b0
--- /dev/null
+++ b/dataset1/GZMsWhEaAAAnGT9.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d662e6b9f1d61698cf492316434280bf7b4d6b01748e5347c1217a14b9259394
+size 285043
diff --git a/dataset1/GZOmFova4AA8FaL.jpg b/dataset1/GZOmFova4AA8FaL.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..265c1c3637e419ea12ba30fde06dca99138116ed
--- /dev/null
+++ b/dataset1/GZOmFova4AA8FaL.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:05c8211779af40735aabbc05cb3bc0fac03919f2f3bef083625add926489eb06
+size 318511
diff --git a/dataset1/GZPadOSaoAAqfo6.jpg b/dataset1/GZPadOSaoAAqfo6.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..8ad97b139b5a63db29c8b66803bc32d38a9649b7
--- /dev/null
+++ b/dataset1/GZPadOSaoAAqfo6.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3670372a12ec3e255ab2122f28e0a78e58f64eb6ed700a69a80a80bbffed22ae
+size 395243
diff --git a/dataset1/GZSKZ1SbIAAqsAx.jpg b/dataset1/GZSKZ1SbIAAqsAx.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..dd6cdc23d4e133f0f52e7d6a2654f631e949bd6d
--- /dev/null
+++ b/dataset1/GZSKZ1SbIAAqsAx.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fc6d9d40562ceba21310ade2f383b346f2255a99886988b5dd808130ca2ee371
+size 797819
diff --git a/dataset1/GZWn_aLasAA26sM.jpg b/dataset1/GZWn_aLasAA26sM.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..2a17defade698f1d6b98e13ffcadd9d65b849493
--- /dev/null
+++ b/dataset1/GZWn_aLasAA26sM.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dbf8c023e061375b93f4f88657a97a0dd0468e29139db983236d41adf0615e5f
+size 463822
diff --git a/dataset1/GZY2K8QaMAAK9Ys.jpg b/dataset1/GZY2K8QaMAAK9Ys.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..f7cb4d47e4fdd28af7a0ad6873a48d09d12dba3b
--- /dev/null
+++ b/dataset1/GZY2K8QaMAAK9Ys.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8da5efc777d1b5c8be00463e3b965f5e9bfe948bf820e076ac9164fe6aea1668
+size 241181
diff --git a/dataset1/GZb8rr0aAAA5Mvk.jpg b/dataset1/GZb8rr0aAAA5Mvk.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9c5513f913a3ddc067c308b22e501230a27659c0
--- /dev/null
+++ b/dataset1/GZb8rr0aAAA5Mvk.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6b772a867fc23294621766bc851049858f25177485d0a9358915491aa92f731f
+size 290307
diff --git a/dataset1/GZdjqWlbcAAqSAP.jpg b/dataset1/GZdjqWlbcAAqSAP.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0d51b711523f1103265bbb837c2e47273009fd79
--- /dev/null
+++ b/dataset1/GZdjqWlbcAAqSAP.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4b33d89a2463bad8c702f38cbed9b52bf866d05fde8f463e5a929e47d2f75a54
+size 193733
diff --git a/dataset1/GZdjqkya8AAAP9g.jpg b/dataset1/GZdjqkya8AAAP9g.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..4e991a1971f326325a4008ffd719ea8e4d0f6dcf
--- /dev/null
+++ b/dataset1/GZdjqkya8AAAP9g.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c9f19e13043c8cbfa480ba22ac7b3ec841d66913bb3c01b47e7db73cd47b97ea
+size 264455
diff --git a/dataset1/GZhGwhNa4AA9PhX.jpg b/dataset1/GZhGwhNa4AA9PhX.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..413e4c7fb1c53e9a6b66e3f32e2dba54bcdf4234
--- /dev/null
+++ b/dataset1/GZhGwhNa4AA9PhX.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bcd235fcdf3fd8954e07f91167648b6c184fca561fb572ca138496fa387d6fc4
+size 375428
diff --git a/dataset1/GZi9tkyaAAE4pKK.jpg b/dataset1/GZi9tkyaAAE4pKK.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..571ba30032b59bed4437c607f6b8f5a1aeae6216
--- /dev/null
+++ b/dataset1/GZi9tkyaAAE4pKK.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:95cf1746bb2ef2f773add79e4a9a074e002d9870ebd946f33330c7096eaf8d42
+size 1092527
diff --git a/dataset1/GZlGO6dasAAxYVr.jpg b/dataset1/GZlGO6dasAAxYVr.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..691637b23192efdac4f73c92dc391923e7184966
--- /dev/null
+++ b/dataset1/GZlGO6dasAAxYVr.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ccfe4a0bbb0647bde4c875067b3f08a5a7e7078dd28e4ca39dd6468cb5404f7b
+size 392562
diff --git a/dataset1/GZmv0gQakAAB6s7.jpg b/dataset1/GZmv0gQakAAB6s7.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..2e23c1accead74511a06b0258fa264fd38ad81b1
--- /dev/null
+++ b/dataset1/GZmv0gQakAAB6s7.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:67aac3e893710474ae1ebd49c95414b3dad9825dbcab15fefff770289a60a58a
+size 1778882
diff --git a/dataset1/GZmv3wSb0AEOrN7.jpg b/dataset1/GZmv3wSb0AEOrN7.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..f14ca03c619aa003f8897a3acf3b2956ffb022b4
--- /dev/null
+++ b/dataset1/GZmv3wSb0AEOrN7.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0d145b3c2fded3bdbdcaaaf8677a2f5bacb5fb2bc8f29ce61430f4676ceb9234
+size 1996683
diff --git a/dataset1/GZmv5xKawAEqrb0.jpg b/dataset1/GZmv5xKawAEqrb0.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..351aa2a8d5a46e70095c7a2b2de23d6dfc572e75
--- /dev/null
+++ b/dataset1/GZmv5xKawAEqrb0.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b3493fadaafb08b6ec8fb318f2b1f7ba6df6b17b64a9e7fdb99030d57afb7222
+size 1521032
diff --git a/dataset1/GZmvyHVaYAEet_v.jpg b/dataset1/GZmvyHVaYAEet_v.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..008e61bc567a001e26af05541d80049480208651
--- /dev/null
+++ b/dataset1/GZmvyHVaYAEet_v.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e69361c5e80c0de0603081cefc8dd0cc185ea6ab54c8c69e9d56c1f7c92da63d
+size 1439109
diff --git a/dataset1/GZn5gLWbsAAWxW2.jpg b/dataset1/GZn5gLWbsAAWxW2.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..f631f07601c819c49b4f7042a6cb8658a4c1fc7d
--- /dev/null
+++ b/dataset1/GZn5gLWbsAAWxW2.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0221656001d919ff72f084ec78e7e417cd7a79bcbfda0149817b066c05a54bf5
+size 274123
diff --git a/dataset1/GZq-Ss2b0AAEByd.jpg b/dataset1/GZq-Ss2b0AAEByd.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..39ed14f261a5cc2570797bf10b9bf05b15b84260
--- /dev/null
+++ b/dataset1/GZq-Ss2b0AAEByd.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4a88041947b042698ca5be54a6c492b805c8ce6708d6f96723a46403c9879d37
+size 121160
diff --git a/dataset1/GZw-_6RaAAQMVv6.jpg b/dataset1/GZw-_6RaAAQMVv6.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..be3daa7c9380eb89970504d33b904e71e6d3e6ff
--- /dev/null
+++ b/dataset1/GZw-_6RaAAQMVv6.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ba87ec79d7384efe2ae12db442966f20bb5c8964b0cbcdb7a0a9205e1e0da15a
+size 323839
diff --git a/dataset1/GZx9nd0aYAAh0rO.jpg b/dataset1/GZx9nd0aYAAh0rO.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..6be4813c4a50ec136096e52cfe26b3a6fbf2d26c
--- /dev/null
+++ b/dataset1/GZx9nd0aYAAh0rO.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:565f309d4c1bd3cdf19cb469a6a75163763cd6abe4e82e145181417289bb22bd
+size 109358
diff --git a/dataset1/GZyGkbvbkAIPzNS.jpg b/dataset1/GZyGkbvbkAIPzNS.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..bac8e8ae7c3a930e50f4b901251197abaf8a1054
--- /dev/null
+++ b/dataset1/GZyGkbvbkAIPzNS.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:db688580c727f6c9ff609d5f8968a79f56df0227a4075bf5f58e3146933330ab
+size 418624
diff --git a/dataset1/GZyW0KMa0AAOj1C.png b/dataset1/GZyW0KMa0AAOj1C.png
new file mode 100644
index 0000000000000000000000000000000000000000..8b4c15408f5da8953d352bfc0f667ea106f89553
--- /dev/null
+++ b/dataset1/GZyW0KMa0AAOj1C.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4aa3e7e03d4543363da64844f2b884e6b17d366988c1dbc05726caf6b7a9e09b
+size 232568
diff --git a/dataset1/Hozumi_leader.webp b/dataset1/Hozumi_leader.webp
new file mode 100644
index 0000000000000000000000000000000000000000..89dba0b6f37658db6264003f9d7377c843fb7577
--- /dev/null
+++ b/dataset1/Hozumi_leader.webp
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9cf720bae9969d9918daf0a87b2e12d2a087fa00dd4cb380352c1d5b57d25ddd
+size 147510
diff --git a/dataset1/Hozumi_lose.webp b/dataset1/Hozumi_lose.webp
new file mode 100644
index 0000000000000000000000000000000000000000..d2b3c73d56e6f101d6b126a1f1f8faa400b3b85f
--- /dev/null
+++ b/dataset1/Hozumi_lose.webp
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c05cbee7534b553d2dcfc24bf10b2dec494470a71b2ee816ca01ade7a5ed4e24
+size 148514
diff --git a/dataset1/Ichinose.Asuna.full.3912797.jpg b/dataset1/Ichinose.Asuna.full.3912797.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..1ae03f43a3eb5cc39438ab29207ea56ab3745166
--- /dev/null
+++ b/dataset1/Ichinose.Asuna.full.3912797.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6c51326be3981f669c0f85e8e41d5f3870cc4cfcd74427de3ddb9a476c6a982d
+size 1000449
diff --git a/dataset1/f22605797c89aa0aa7748e6591cae0931841784.png b/dataset1/f22605797c89aa0aa7748e6591cae0931841784.png
new file mode 100644
index 0000000000000000000000000000000000000000..a156053ce02d331887ae46723c97b90ec54b98fb
--- /dev/null
+++ b/dataset1/f22605797c89aa0aa7748e6591cae0931841784.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4182bf1bd88f90c26824bff01c27cf4b4c03831014de39881768a8082458dac7
+size 873178
diff --git a/dataset1/f616d60cabc65cb6cd414421193a44e4251799.png b/dataset1/f616d60cabc65cb6cd414421193a44e4251799.png
new file mode 100644
index 0000000000000000000000000000000000000000..78601f7b58a9570cab10e9c47471457fab6f9f1b
--- /dev/null
+++ b/dataset1/f616d60cabc65cb6cd414421193a44e4251799.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ba73cf6c9a68ec4dac698d184e50c9d1b6b3201c20300172f03b80f42862c98f
+size 2077220
diff --git a/dataset1/f7488d4ecda1947809f6ede30a4d76cd.jpg b/dataset1/f7488d4ecda1947809f6ede30a4d76cd.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..064efc33a9a07777accf82dac8dd70291cf60247
--- /dev/null
+++ b/dataset1/f7488d4ecda1947809f6ede30a4d76cd.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0dccd02ee306922cf8699b857ae7e89e81897673820c5bebada0aa11b22ae1c4
+size 135958
diff --git a/dataset1/fa6f33b75d4fdb275e65fcc82bc8051b.jpg b/dataset1/fa6f33b75d4fdb275e65fcc82bc8051b.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..3bdb1750be0c2e1bd7ad44595663e990f0b08556
Binary files /dev/null and b/dataset1/fa6f33b75d4fdb275e65fcc82bc8051b.jpg differ
diff --git a/dataset1/fd0c8ce91178e5b1ff12a4623caa7dd9360195221.jpg b/dataset1/fd0c8ce91178e5b1ff12a4623caa7dd9360195221.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9b08653facdfacbab8514349733f3f6d9dea30a2
--- /dev/null
+++ b/dataset1/fd0c8ce91178e5b1ff12a4623caa7dd9360195221.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0fd66122c4f8cdde012f8a8b18c554ee764a10872abf1cb0e0b872c496028ce8
+size 1521500
diff --git a/dataset1/fkOTGiYdaIEetVXAj68MVpl5.jpeg b/dataset1/fkOTGiYdaIEetVXAj68MVpl5.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..54ec9beee237831d12203df788efc748c48580be
--- /dev/null
+++ b/dataset1/fkOTGiYdaIEetVXAj68MVpl5.jpeg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:94a62d93941604cfb87a0f4ae15e2d86486721c942bc15103951610495faf640
+size 2527906
diff --git a/dataset1/h6v44095z4.jpg b/dataset1/h6v44095z4.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..3601d990c590d91b7cc6143d41db96620a9bb34f
--- /dev/null
+++ b/dataset1/h6v44095z4.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6c2b6d7e518ba6046ce188e569b0e2207244ec022f23fefaf614e5a493aaccad
+size 422030
diff --git a/dataset1/htq3bssb09.jpg b/dataset1/htq3bssb09.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9abbea8216b6d2dc173ca97da95fe2d3d90cd980
--- /dev/null
+++ b/dataset1/htq3bssb09.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b4b3b8ca820555e6bb13a6a0ae76a856f02a7043a72053792ba3ded945a19eda
+size 389020
diff --git a/dataset1/https___ugc-media.4gamers.com.tw_puku-prod-zh_anonymous-story_8cf1c10d-f286-41cf-bb21-5fcd5fdf8a8d.jpg b/dataset1/https___ugc-media.4gamers.com.tw_puku-prod-zh_anonymous-story_8cf1c10d-f286-41cf-bb21-5fcd5fdf8a8d.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..c46b074da99657faab7f1afb68a7cef9b0e0af2c
--- /dev/null
+++ b/dataset1/https___ugc-media.4gamers.com.tw_puku-prod-zh_anonymous-story_8cf1c10d-f286-41cf-bb21-5fcd5fdf8a8d.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9b19de284256dd75462e3e1d69864aa73be0c6a9a372cbbd077afad9f54cfffc
+size 146167
diff --git a/dataset1/i16412848906.jpg b/dataset1/i16412848906.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0967e8b4b97a689aa7f85acac6ce066cc769c762
--- /dev/null
+++ b/dataset1/i16412848906.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a72900a2619ba60505eb611a04016cd20a73281bf6280dc253e1c513441d8e5e
+size 127274
diff --git a/dataset1/i16485506310.jpg b/dataset1/i16485506310.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0073cf449d33612e8d8c3d42bca9c2d5e06cd667
--- /dev/null
+++ b/dataset1/i16485506310.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c592eb4be2d3f683a5d87286e96092d9cd2633f18484a418f9b708b7093f536a
+size 111099
diff --git a/dataset1/i471py23u2.jpg b/dataset1/i471py23u2.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..a84b53835e4d4d6573702754d2c4db95197fb0cc
Binary files /dev/null and b/dataset1/i471py23u2.jpg differ
diff --git a/dataset1/i6h811yy8h.jpg b/dataset1/i6h811yy8h.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..a78319791f32cd979a6db0e38eba49b309c52e09
Binary files /dev/null and b/dataset1/i6h811yy8h.jpg differ
diff --git a/dataset1/iavdrqfuwt.jpg b/dataset1/iavdrqfuwt.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..d35425c7ced10f0bc587e82146aca091a61fdeda
Binary files /dev/null and b/dataset1/iavdrqfuwt.jpg differ
diff --git a/dataset1/ibe11ytjol.jpg b/dataset1/ibe11ytjol.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..049fdc6bd1680b6bf6e594e7a699c59e5f574633
Binary files /dev/null and b/dataset1/ibe11ytjol.jpg differ
diff --git a/dataset1/ibqlid61o5.jpg b/dataset1/ibqlid61o5.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..91fb445610f4279756078563107d1724364c4cd3
--- /dev/null
+++ b/dataset1/ibqlid61o5.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2b4a0f97c8dfce93c896737f70832a9bd719f94095e69662c617974585d6ab65
+size 1941443
diff --git a/diffaug.py b/diffaug.py
new file mode 100644
index 0000000000000000000000000000000000000000..54c0894f9109451acd61e27e84e97dc9eaec5616
--- /dev/null
+++ b/diffaug.py
@@ -0,0 +1,76 @@
+# Differentiable Augmentation for Data-Efficient GAN Training
+# Shengyu Zhao, Zhijian Liu, Ji Lin, Jun-Yan Zhu, and Song Han
+# https://arxiv.org/pdf/2006.10738
+
+import torch
+import torch.nn.functional as F
+
+
+def DiffAugment(x, policy='', channels_first=True):
+ if policy:
+ if not channels_first:
+ x = x.permute(0, 3, 1, 2)
+ for p in policy.split(','):
+ for f in AUGMENT_FNS[p]:
+ x = f(x)
+ if not channels_first:
+ x = x.permute(0, 2, 3, 1)
+ x = x.contiguous()
+ return x
+
+
+def rand_brightness(x):
+ x = x + (torch.rand(x.size(0), 1, 1, 1, dtype=x.dtype, device=x.device) - 0.5)
+ return x
+
+
+def rand_saturation(x):
+ x_mean = x.mean(dim=1, keepdim=True)
+ x = (x - x_mean) * (torch.rand(x.size(0), 1, 1, 1, dtype=x.dtype, device=x.device) * 2) + x_mean
+ return x
+
+
+def rand_contrast(x):
+ x_mean = x.mean(dim=[1, 2, 3], keepdim=True)
+ x = (x - x_mean) * (torch.rand(x.size(0), 1, 1, 1, dtype=x.dtype, device=x.device) + 0.5) + x_mean
+ return x
+
+
+def rand_translation(x, ratio=0.125):
+ shift_x, shift_y = int(x.size(2) * ratio + 0.5), int(x.size(3) * ratio + 0.5)
+ translation_x = torch.randint(-shift_x, shift_x + 1, size=[x.size(0), 1, 1], device=x.device)
+ translation_y = torch.randint(-shift_y, shift_y + 1, size=[x.size(0), 1, 1], device=x.device)
+ grid_batch, grid_x, grid_y = torch.meshgrid(
+ torch.arange(x.size(0), dtype=torch.long, device=x.device),
+ torch.arange(x.size(2), dtype=torch.long, device=x.device),
+ torch.arange(x.size(3), dtype=torch.long, device=x.device),
+ )
+ grid_x = torch.clamp(grid_x + translation_x + 1, 0, x.size(2) + 1)
+ grid_y = torch.clamp(grid_y + translation_y + 1, 0, x.size(3) + 1)
+ x_pad = F.pad(x, [1, 1, 1, 1, 0, 0, 0, 0])
+ x = x_pad.permute(0, 2, 3, 1).contiguous()[grid_batch, grid_x, grid_y].permute(0, 3, 1, 2)
+ return x
+
+
+def rand_cutout(x, ratio=0.5):
+ cutout_size = int(x.size(2) * ratio + 0.5), int(x.size(3) * ratio + 0.5)
+ offset_x = torch.randint(0, x.size(2) + (1 - cutout_size[0] % 2), size=[x.size(0), 1, 1], device=x.device)
+ offset_y = torch.randint(0, x.size(3) + (1 - cutout_size[1] % 2), size=[x.size(0), 1, 1], device=x.device)
+ grid_batch, grid_x, grid_y = torch.meshgrid(
+ torch.arange(x.size(0), dtype=torch.long, device=x.device),
+ torch.arange(cutout_size[0], dtype=torch.long, device=x.device),
+ torch.arange(cutout_size[1], dtype=torch.long, device=x.device),
+ )
+ grid_x = torch.clamp(grid_x + offset_x - cutout_size[0] // 2, min=0, max=x.size(2) - 1)
+ grid_y = torch.clamp(grid_y + offset_y - cutout_size[1] // 2, min=0, max=x.size(3) - 1)
+ mask = torch.ones(x.size(0), x.size(2), x.size(3), dtype=x.dtype, device=x.device)
+ mask[grid_batch, grid_x, grid_y] = 0
+ x = x * mask.unsqueeze(1)
+ return x
+
+
+AUGMENT_FNS = {
+ 'color': [rand_brightness, rand_saturation, rand_contrast],
+ 'translation': [rand_translation],
+ 'cutout': [rand_cutout],
+}
\ No newline at end of file
diff --git a/docker/Dockerfile.cpu b/docker/Dockerfile.cpu
new file mode 100644
index 0000000000000000000000000000000000000000..36350d992ff84329efe6ce2ea4d1abd86d34400a
--- /dev/null
+++ b/docker/Dockerfile.cpu
@@ -0,0 +1,58 @@
+FROM python:3.8-buster
+
+ENV DEBIAN_FRONTEND=noninteractive
+SHELL ["/bin/bash", "-c"]
+
+RUN apt-get update && apt-get install -y unzip
+
+RUN pip install gdown
+RUN mkdir /code
+WORKDIR /code
+
+# Download pre-trained models and remove all but the latest
+# checkpoint for each model to save space
+
+RUN gdown -O trial_shell.zip "https://drive.google.com/uc?id=1plZ72wC1u8jX12PD3FaMzV5Z06XUuLj-" && \
+ unzip trial_shell.zip && \
+ rm trial_shell.zip && \
+ rm trial_shell/models/{all_10000.pth,all_20000.pth,10000.pth,20000.pth,30000.pth} && \
+ mv trial_shell/models/all_30000.pth trial_shell/models/30000.pth
+RUN gdown -O trial_skull.zip "https://drive.google.com/uc?id=1MVHSnf3Z42ZcRPk-29qXfjYgS1CKPuhm" && \
+ unzip trial_skull.zip && \
+ rm trial_skull.zip && \
+ rm trial_skull/models/{30000.pth,40000.pth}
+RUN gdown -O trial_dog.zip "https://drive.google.com/uc?id=1iHdCRXG_Y7Z_fTwFPMHAnHYGcmNpaHVn" && \
+ unzip trial_dog.zip && \
+ rm trial_dog.zip && \
+ rm trial_dog/models/{40000.pth,60000.pth}
+RUN gdown -O trial_panda.zip "https://drive.google.com/uc?id=1p1oRxpljgc2_M4NfaRrxmfNeC8RWAw8V" && \
+ unzip trial_panda.zip && \
+ rm trial_panda.zip && \
+ rm trial_panda/models/30000.pth
+RUN gdown -O good_ffhq_full_512.zip "https://drive.google.com/uc?id=1oBxHC16Vpm-_9xWkuM43MHGQMMVijyJA" && \
+ unzip good_ffhq_full_512.zip && \
+ rm good_ffhq_full_512.zip && \
+ mv good_ffhq_full_512/models/all_100000.pth good_ffhq_full_512/models/100000.pth
+RUN gdown -O good_art_1k_512.zip "https://drive.google.com/uc?id=1RHTmh0dWM0Mg-S8_maKv5Up3m6wuwY08" && \
+ unzip good_art_1k_512.zip && \
+ rm good_art_1k_512.zip && \
+ mv good_art_1k_512/models/all_50000.pth good_art_1k_512/models/50000.pth
+
+RUN pip install \
+ tqdm==4.56.0 \
+ scipy==1.6.0 \
+ scikit-image==0.18.1 \
+ ipdb==0.13.4 \
+ pandas==1.2.1 \
+ lmdb==1.0.0 \
+ opencv-python==4.5.1.48 \
+ easing-functions==1.0.4 \
+ torch==1.7.0 \
+ torchvision==0.8.0
+
+# Make the models work on cpu
+RUN for model in *; do sed -i "s/torch.device('cuda:%d'%(args.cuda))/torch.device('cpu')/" $model/eval.py; done
+
+COPY docker/infer.sh infer.sh
+RUN chmod +x infer.sh
+ENTRYPOINT ["./infer.sh"]
diff --git a/docker/Dockerfile.gpu b/docker/Dockerfile.gpu
new file mode 100644
index 0000000000000000000000000000000000000000..fbb65acfbf67a643c5e1762a2eb4072abaef27a2
--- /dev/null
+++ b/docker/Dockerfile.gpu
@@ -0,0 +1,52 @@
+FROM docker.io/pytorch/pytorch:1.7.0-cuda11.0-cudnn8-devel
+
+SHELL ["/bin/bash", "-c"]
+
+RUN apt-get update && apt-get install -y unzip
+
+RUN pip install gdown
+RUN mkdir /code
+WORKDIR /code
+
+# Download pre-trained models and remove all but the latest
+# checkpoint for each model to save space
+
+RUN gdown -O trial_shell.zip "https://drive.google.com/uc?id=1plZ72wC1u8jX12PD3FaMzV5Z06XUuLj-" && \
+ unzip trial_shell.zip && \
+ rm trial_shell.zip && \
+ rm trial_shell/models/{all_10000.pth,all_20000.pth,10000.pth,20000.pth,30000.pth} && \
+ mv trial_shell/models/all_30000.pth trial_shell/models/30000.pth
+RUN gdown -O trial_skull.zip "https://drive.google.com/uc?id=1MVHSnf3Z42ZcRPk-29qXfjYgS1CKPuhm" && \
+ unzip trial_skull.zip && \
+ rm trial_skull.zip && \
+ rm trial_skull/models/{30000.pth,40000.pth}
+RUN gdown -O trial_dog.zip "https://drive.google.com/uc?id=1iHdCRXG_Y7Z_fTwFPMHAnHYGcmNpaHVn" && \
+ unzip trial_dog.zip && \
+ rm trial_dog.zip && \
+ rm trial_dog/models/{40000.pth,60000.pth}
+RUN gdown -O trial_panda.zip "https://drive.google.com/uc?id=1p1oRxpljgc2_M4NfaRrxmfNeC8RWAw8V" && \
+ unzip trial_panda.zip && \
+ rm trial_panda.zip && \
+ rm trial_panda/models/30000.pth
+RUN gdown -O good_ffhq_full_512.zip "https://drive.google.com/uc?id=1oBxHC16Vpm-_9xWkuM43MHGQMMVijyJA" && \
+ unzip good_ffhq_full_512.zip && \
+ rm good_ffhq_full_512.zip && \
+ mv good_ffhq_full_512/models/all_100000.pth good_ffhq_full_512/models/100000.pth
+RUN gdown -O good_art_1k_512.zip "https://drive.google.com/uc?id=1RHTmh0dWM0Mg-S8_maKv5Up3m6wuwY08" && \
+ unzip good_art_1k_512.zip && \
+ rm good_art_1k_512.zip && \
+ mv good_art_1k_512/models/all_50000.pth good_art_1k_512/models/50000.pth
+
+RUN pip install \
+ tqdm==4.56.0 \
+ scipy==1.6.0 \
+ scikit-image==0.18.1 \
+ ipdb==0.13.4 \
+ pandas==1.2.1 \
+ lmdb==1.0.0 \
+ opencv-python==4.5.1.48 \
+ easing-functions==1.0.4
+
+COPY docker/infer.sh infer.sh
+RUN chmod +x infer.sh
+ENTRYPOINT ["./infer.sh"]
diff --git a/docker/build-and-push.sh b/docker/build-and-push.sh
new file mode 100644
index 0000000000000000000000000000000000000000..75aef00b341d96c3fe560a2be2ba64e3543e6a49
--- /dev/null
+++ b/docker/build-and-push.sh
@@ -0,0 +1,41 @@
+#!/bin/bash -eux
+
+# Run this script from the repo's root folder
+#
+# $ ./docker/build-and-push.sh
+
+# 1. Build Docker images for CPU and GPU
+
+image="us-docker.pkg.dev/replicate/odegeasslbc/fastgan"
+cpu_tag="$image:cpu"
+gpu_tag="$image:gpu"
+
+docker build -f docker/Dockerfile.cpu --tag "$cpu_tag" .
+docker build -f docker/Dockerfile.gpu --tag "$gpu_tag" .
+
+# 2. Test Docker images
+
+test_output_folder=/tmp/test-chromagan/output
+
+docker run -it --rm \
+ -v $test_output_folder/cpu:/outputs \
+ $cpu_tag \
+ art --n_sample=20
+
+[ -f $test_output_folder/cpu/0.png ] || exit 1
+[ -f $test_output_folder/cpu/9.png ] || exit 1
+
+docker run --gpus all -it --rm \
+ -v $test_output_folder/gpu:/outputs \
+ $gpu_tag \
+ art --n_sample=20
+
+[ -f $test_output_folder/gpu/0.png ] || exit 1
+[ -f $test_output_folder/gpu/9.png ] || exit 1
+
+sudo rm -rf "$test_output_folder"
+
+# 3. Push Docker images
+
+docker push $cpu_tag
+docker push $gpu_tag
diff --git a/docker/infer.sh b/docker/infer.sh
new file mode 100644
index 0000000000000000000000000000000000000000..4ff7b3672050fbc68b1444fa4d8b2c887104b218
--- /dev/null
+++ b/docker/infer.sh
@@ -0,0 +1,61 @@
+#!/bin/bash -eu
+
+# The eval.py scripts in the various pre-trained model folders differ slightly.
+# * The model iteration is different
+# * The range() statement that selects the checkpoint iteration sometimes includes +1 on end_iter, sometimes not
+# * The image size differs
+# * The batch size differs
+
+case $1 in
+
+ shell)
+ model="trial_shell"
+ start_iter=3
+ end_iter=4
+ size=1024
+ batch_size=8
+ ;;
+
+ skull)
+ model="trial_skull"
+ start_iter=5
+ end_iter=6
+ size=1024
+ batch_size=8
+ ;;
+
+ dog)
+ model="trial_dog"
+ start_iter=8
+ end_iter=8
+ size=256
+ batch_size=8
+ ;;
+
+ art)
+ model="good_art_1k_512"
+ start_iter=5
+ end_iter=5
+ size=512
+ batch_size=12
+ ;;
+
+ face)
+ model="good_ffhq_full_512"
+ start_iter=10
+ end_iter=10
+ size=512
+ batch_size=16
+ ;;
+
+ *)
+ echo "Unknown model '$1', valid options are: 'art', 'face', 'shell', 'skull', 'dog'."
+ exit 1
+ ;;
+esac
+
+shift 1
+
+cd $model
+python eval.py --start_iter=$start_iter --end_iter=$end_iter --im_size=$size --size=$size --batch=$batch_size $@
+mv eval_${start_iter}0000/img/* /outputs/
diff --git a/eval.py b/eval.py
new file mode 100644
index 0000000000000000000000000000000000000000..e25899d648f2a85e468e4087b21a8b7b351f7ecb
--- /dev/null
+++ b/eval.py
@@ -0,0 +1,92 @@
+import torch
+from torch import nn
+from torch import optim
+import torch.nn.functional as F
+from torchvision.datasets import ImageFolder
+from torch.utils.data import DataLoader
+from torchvision import utils as vutils
+
+import os
+import random
+import argparse
+from tqdm import tqdm
+
+from models import Generator
+
+
+def load_params(model, new_param):
+ for p, new_p in zip(model.parameters(), new_param):
+ p.data.copy_(new_p)
+
+def resize(img,size=256):
+ return F.interpolate(img, size=size)
+
+def batch_generate(zs, netG, batch=8):
+ g_images = []
+ with torch.no_grad():
+ for i in range(len(zs)//batch):
+ g_images.append( netG(zs[i*batch:(i+1)*batch]).cpu() )
+ if len(zs)%batch>0:
+ g_images.append( netG(zs[-(len(zs)%batch):]).cpu() )
+ return torch.cat(g_images)
+
+def batch_save(images, folder_name):
+ if not os.path.exists(folder_name):
+ os.mkdir(folder_name)
+ for i, image in enumerate(images):
+ vutils.save_image(image.add(1).mul(0.5), folder_name+'/%d.jpg'%i)
+
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(
+ description='generate images'
+ )
+ parser.add_argument('--ckpt', type=str)
+ parser.add_argument('--artifacts', type=str, default=".", help='path to artifacts.')
+ parser.add_argument('--cuda', type=int, default=0, help='index of gpu to use')
+ parser.add_argument('--start_iter', type=int, default=6)
+ parser.add_argument('--end_iter', type=int, default=10)
+
+ parser.add_argument('--dist', type=str, default='.')
+ parser.add_argument('--size', type=int, default=256)
+ parser.add_argument('--batch', default=16, type=int, help='batch size')
+ parser.add_argument('--n_sample', type=int, default=2000)
+ parser.add_argument('--big', action='store_true')
+ parser.add_argument('--im_size', type=int, default=1024)
+ parser.add_argument('--multiplier', type=int, default=10000, help='multiplier for model number')
+ parser.set_defaults(big=False)
+ args = parser.parse_args()
+
+ noise_dim = 256
+ device = torch.device('cuda:%d'%(args.cuda))
+
+ net_ig = Generator( ngf=64, nz=noise_dim, nc=3, im_size=args.im_size)#, big=args.big )
+ net_ig.to(device)
+
+ for epoch in [args.multiplier*i for i in range(args.start_iter, args.end_iter+1)]:
+ ckpt = f"{args.artifacts}/models/{epoch}.pth"
+ checkpoint = torch.load(ckpt, map_location=lambda a,b: a)
+ # Remove prefix `module`.
+ checkpoint['g'] = {k.replace('module.', ''): v for k, v in checkpoint['g'].items()}
+ net_ig.load_state_dict(checkpoint['g'])
+ #load_params(net_ig, checkpoint['g_ema'])
+
+ #net_ig.eval()
+ print('load checkpoint success, epoch %d'%epoch)
+
+ net_ig.to(device)
+
+ del checkpoint
+
+ dist = 'eval_%d'%(epoch)
+ dist = os.path.join(dist, 'img')
+ os.makedirs(dist, exist_ok=True)
+
+ with torch.no_grad():
+ for i in tqdm(range(args.n_sample//args.batch)):
+ noise = torch.randn(args.batch, noise_dim).to(device)
+ g_imgs = net_ig(noise)[0]
+ g_imgs = resize(g_imgs,args.im_size) # resize the image using given dimension
+ for j, g_img in enumerate( g_imgs ):
+ vutils.save_image(g_img.add(1).mul(0.5),
+ os.path.join(dist, '%d.png'%(i*args.batch+j)))#, normalize=True, range=(-1,1))
diff --git a/lpips/__init__.py b/lpips/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..1878b3ffa8eea1c3557ad08314665766c9ae45e3
--- /dev/null
+++ b/lpips/__init__.py
@@ -0,0 +1,168 @@
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+import numpy as np
+import skimage
+import torch
+from torch.autograd import Variable
+
+from lpips import dist_model
+
+
+if skimage.__version__ == '0.14.3':
+ from skimage.measure import compare_ssim
+else:
+ from skimage.metrics import structural_similarity as compare_ssim
+
+
+
+class PerceptualLoss(torch.nn.Module):
+ def __init__(self, model='net-lin', net='alex', colorspace='rgb', spatial=False, use_gpu=True, gpu_ids=[0]): # VGG using our perceptually-learned weights (LPIPS metric)
+ # def __init__(self, model='net', net='vgg', use_gpu=True): # "default" way of using VGG as a perceptual loss
+ super(PerceptualLoss, self).__init__()
+ print('Setting up Perceptual loss...')
+ self.use_gpu = use_gpu
+ self.spatial = spatial
+ self.gpu_ids = gpu_ids
+ self.model = dist_model.DistModel()
+ self.model.initialize(model=model, net=net, use_gpu=use_gpu, colorspace=colorspace, spatial=self.spatial, gpu_ids=gpu_ids)
+ print('...[%s] initialized'%self.model.name())
+ print('...Done')
+
+ def forward(self, pred, target, normalize=False):
+ """
+ Pred and target are Variables.
+ If normalize is True, assumes the images are between [0,1] and then scales them between [-1,+1]
+ If normalize is False, assumes the images are already between [-1,+1]
+
+ Inputs pred and target are Nx3xHxW
+ Output pytorch Variable N long
+ """
+
+ if normalize:
+ target = 2 * target - 1
+ pred = 2 * pred - 1
+
+ return self.model.forward(target, pred)
+
+def normalize_tensor(in_feat,eps=1e-10):
+ norm_factor = torch.sqrt(torch.sum(in_feat**2,dim=1,keepdim=True))
+ return in_feat/(norm_factor+eps)
+
+def l2(p0, p1, range=255.):
+ return .5*np.mean((p0 / range - p1 / range)**2)
+
+def psnr(p0, p1, peak=255.):
+ return 10*np.log10(peak**2/np.mean((1.*p0-1.*p1)**2))
+
+def dssim(p0, p1, range=255.):
+ return (1 - compare_ssim(p0, p1, data_range=range, multichannel=True)) / 2.
+
+def rgb2lab(in_img,mean_cent=False):
+ from skimage import color
+ img_lab = color.rgb2lab(in_img)
+ if(mean_cent):
+ img_lab[:,:,0] = img_lab[:,:,0]-50
+ return img_lab
+
+def tensor2np(tensor_obj):
+ # change dimension of a tensor object into a numpy array
+ return tensor_obj[0].cpu().float().numpy().transpose((1,2,0))
+
+def np2tensor(np_obj):
+ # change dimenion of np array into tensor array
+ return torch.Tensor(np_obj[:, :, :, np.newaxis].transpose((3, 2, 0, 1)))
+
+def tensor2tensorlab(image_tensor,to_norm=True,mc_only=False):
+ # image tensor to lab tensor
+ from skimage import color
+
+ img = tensor2im(image_tensor)
+ img_lab = color.rgb2lab(img)
+ if(mc_only):
+ img_lab[:,:,0] = img_lab[:,:,0]-50
+ if(to_norm and not mc_only):
+ img_lab[:,:,0] = img_lab[:,:,0]-50
+ img_lab = img_lab/100.
+
+ return np2tensor(img_lab)
+
+def tensorlab2tensor(lab_tensor,return_inbnd=False):
+ from skimage import color
+ import warnings
+ warnings.filterwarnings("ignore")
+
+ lab = tensor2np(lab_tensor)*100.
+ lab[:,:,0] = lab[:,:,0]+50
+
+ rgb_back = 255.*np.clip(color.lab2rgb(lab.astype('float')),0,1)
+ if(return_inbnd):
+ # convert back to lab, see if we match
+ lab_back = color.rgb2lab(rgb_back.astype('uint8'))
+ mask = 1.*np.isclose(lab_back,lab,atol=2.)
+ mask = np2tensor(np.prod(mask,axis=2)[:,:,np.newaxis])
+ return (im2tensor(rgb_back),mask)
+ else:
+ return im2tensor(rgb_back)
+
+def rgb2lab(input):
+ from skimage import color
+ return color.rgb2lab(input / 255.)
+
+def tensor2im(image_tensor, imtype=np.uint8, cent=1., factor=255./2.):
+ image_numpy = image_tensor[0].cpu().float().numpy()
+ image_numpy = (np.transpose(image_numpy, (1, 2, 0)) + cent) * factor
+ return image_numpy.astype(imtype)
+
+def im2tensor(image, imtype=np.uint8, cent=1., factor=255./2.):
+ return torch.Tensor((image / factor - cent)
+ [:, :, :, np.newaxis].transpose((3, 2, 0, 1)))
+
+def tensor2vec(vector_tensor):
+ return vector_tensor.data.cpu().numpy()[:, :, 0, 0]
+
+def voc_ap(rec, prec, use_07_metric=False):
+ """ ap = voc_ap(rec, prec, [use_07_metric])
+ Compute VOC AP given precision and recall.
+ If use_07_metric is true, uses the
+ VOC 07 11 point method (default:False).
+ """
+ if use_07_metric:
+ # 11 point metric
+ ap = 0.
+ for t in np.arange(0., 1.1, 0.1):
+ if np.sum(rec >= t) == 0:
+ p = 0
+ else:
+ p = np.max(prec[rec >= t])
+ ap = ap + p / 11.
+ else:
+ # correct AP calculation
+ # first append sentinel values at the end
+ mrec = np.concatenate(([0.], rec, [1.]))
+ mpre = np.concatenate(([0.], prec, [0.]))
+
+ # compute the precision envelope
+ for i in range(mpre.size - 1, 0, -1):
+ mpre[i - 1] = np.maximum(mpre[i - 1], mpre[i])
+
+ # to calculate area under PR curve, look for points
+ # where X axis (recall) changes value
+ i = np.where(mrec[1:] != mrec[:-1])[0]
+
+ # and sum (\Delta recall) * prec
+ ap = np.sum((mrec[i + 1] - mrec[i]) * mpre[i + 1])
+ return ap
+
+def tensor2im(image_tensor, imtype=np.uint8, cent=1., factor=255./2.):
+# def tensor2im(image_tensor, imtype=np.uint8, cent=1., factor=1.):
+ image_numpy = image_tensor[0].cpu().float().numpy()
+ image_numpy = (np.transpose(image_numpy, (1, 2, 0)) + cent) * factor
+ return image_numpy.astype(imtype)
+
+def im2tensor(image, imtype=np.uint8, cent=1., factor=255./2.):
+# def im2tensor(image, imtype=np.uint8, cent=1., factor=1.):
+ return torch.Tensor((image / factor - cent)
+ [:, :, :, np.newaxis].transpose((3, 2, 0, 1)))
diff --git a/lpips/base_model.py b/lpips/base_model.py
new file mode 100644
index 0000000000000000000000000000000000000000..9fdb930666adc63c6b20b023d4ccabc7ecf78ed3
--- /dev/null
+++ b/lpips/base_model.py
@@ -0,0 +1,58 @@
+import os
+import torch
+from torch.autograd import Variable
+from pdb import set_trace as st
+from IPython import embed
+
+class BaseModel():
+ def __init__(self):
+ pass;
+
+ def name(self):
+ return 'BaseModel'
+
+ def initialize(self, use_gpu=True, gpu_ids=[0]):
+ self.use_gpu = use_gpu
+ self.gpu_ids = gpu_ids
+
+ def forward(self):
+ pass
+
+ def get_image_paths(self):
+ pass
+
+ def optimize_parameters(self):
+ pass
+
+ def get_current_visuals(self):
+ return self.input
+
+ def get_current_errors(self):
+ return {}
+
+ def save(self, label):
+ pass
+
+ # helper saving function that can be used by subclasses
+ def save_network(self, network, path, network_label, epoch_label):
+ save_filename = '%s_net_%s.pth' % (epoch_label, network_label)
+ save_path = os.path.join(path, save_filename)
+ torch.save(network.state_dict(), save_path)
+
+ # helper loading function that can be used by subclasses
+ def load_network(self, network, network_label, epoch_label):
+ save_filename = '%s_net_%s.pth' % (epoch_label, network_label)
+ save_path = os.path.join(self.save_dir, save_filename)
+ print('Loading network from %s'%save_path)
+ network.load_state_dict(torch.load(save_path))
+
+ def update_learning_rate():
+ pass
+
+ def get_image_paths(self):
+ return self.image_paths
+
+ def save_done(self, flag=False):
+ np.save(os.path.join(self.save_dir, 'done_flag'),flag)
+ np.savetxt(os.path.join(self.save_dir, 'done_flag'),[flag,],fmt='%i')
+
diff --git a/lpips/dist_model.py b/lpips/dist_model.py
new file mode 100644
index 0000000000000000000000000000000000000000..4ff0aa4ca6e4b217954c167787eaac1ca1f8e304
--- /dev/null
+++ b/lpips/dist_model.py
@@ -0,0 +1,284 @@
+
+from __future__ import absolute_import
+
+import sys
+import numpy as np
+import torch
+from torch import nn
+import os
+from collections import OrderedDict
+from torch.autograd import Variable
+import itertools
+from .base_model import BaseModel
+from scipy.ndimage import zoom
+import fractions
+import functools
+import skimage.transform
+from tqdm import tqdm
+
+from IPython import embed
+
+from . import networks_basic as networks
+import lpips as util
+
+class DistModel(BaseModel):
+ def name(self):
+ return self.model_name
+
+ def initialize(self, model='net-lin', net='alex', colorspace='Lab', pnet_rand=False, pnet_tune=False, model_path=None,
+ use_gpu=True, printNet=False, spatial=False,
+ is_train=False, lr=.0001, beta1=0.5, version='0.1', gpu_ids=[0]):
+ '''
+ INPUTS
+ model - ['net-lin'] for linearly calibrated network
+ ['net'] for off-the-shelf network
+ ['L2'] for L2 distance in Lab colorspace
+ ['SSIM'] for ssim in RGB colorspace
+ net - ['squeeze','alex','vgg']
+ model_path - if None, will look in weights/[NET_NAME].pth
+ colorspace - ['Lab','RGB'] colorspace to use for L2 and SSIM
+ use_gpu - bool - whether or not to use a GPU
+ printNet - bool - whether or not to print network architecture out
+ spatial - bool - whether to output an array containing varying distances across spatial dimensions
+ spatial_shape - if given, output spatial shape. if None then spatial shape is determined automatically via spatial_factor (see below).
+ spatial_factor - if given, specifies upsampling factor relative to the largest spatial extent of a convolutional layer. if None then resized to size of input images.
+ spatial_order - spline order of filter for upsampling in spatial mode, by default 1 (bilinear).
+ is_train - bool - [True] for training mode
+ lr - float - initial learning rate
+ beta1 - float - initial momentum term for adam
+ version - 0.1 for latest, 0.0 was original (with a bug)
+ gpu_ids - int array - [0] by default, gpus to use
+ '''
+ BaseModel.initialize(self, use_gpu=use_gpu, gpu_ids=gpu_ids)
+
+ self.model = model
+ self.net = net
+ self.is_train = is_train
+ self.spatial = spatial
+ self.gpu_ids = gpu_ids
+ self.model_name = '%s [%s]'%(model,net)
+
+ if(self.model == 'net-lin'): # pretrained net + linear layer
+ self.net = networks.PNetLin(pnet_rand=pnet_rand, pnet_tune=pnet_tune, pnet_type=net,
+ use_dropout=True, spatial=spatial, version=version, lpips=True)
+ kw = {}
+ if not use_gpu:
+ kw['map_location'] = 'cpu'
+ if(model_path is None):
+ import inspect
+ model_path = os.path.abspath(os.path.join(inspect.getfile(self.initialize), '..', 'weights/v%s/%s.pth'%(version,net)))
+
+ if(not is_train):
+ print('Loading model from: %s'%model_path)
+ self.net.load_state_dict(torch.load(model_path, **kw), strict=False)
+
+ elif(self.model=='net'): # pretrained network
+ self.net = networks.PNetLin(pnet_rand=pnet_rand, pnet_type=net, lpips=False)
+ elif(self.model in ['L2','l2']):
+ self.net = networks.L2(use_gpu=use_gpu,colorspace=colorspace) # not really a network, only for testing
+ self.model_name = 'L2'
+ elif(self.model in ['DSSIM','dssim','SSIM','ssim']):
+ self.net = networks.DSSIM(use_gpu=use_gpu,colorspace=colorspace)
+ self.model_name = 'SSIM'
+ else:
+ raise ValueError("Model [%s] not recognized." % self.model)
+
+ self.parameters = list(self.net.parameters())
+
+ if self.is_train: # training mode
+ # extra network on top to go from distances (d0,d1) => predicted human judgment (h*)
+ self.rankLoss = networks.BCERankingLoss()
+ self.parameters += list(self.rankLoss.net.parameters())
+ self.lr = lr
+ self.old_lr = lr
+ self.optimizer_net = torch.optim.Adam(self.parameters, lr=lr, betas=(beta1, 0.999))
+ else: # test mode
+ self.net.eval()
+
+ if(use_gpu):
+ self.net.to(gpu_ids[0])
+ self.net = torch.nn.DataParallel(self.net, device_ids=gpu_ids)
+ if(self.is_train):
+ self.rankLoss = self.rankLoss.to(device=gpu_ids[0]) # just put this on GPU0
+
+ if(printNet):
+ print('---------- Networks initialized -------------')
+ networks.print_network(self.net)
+ print('-----------------------------------------------')
+
+ def forward(self, in0, in1, retPerLayer=False):
+ ''' Function computes the distance between image patches in0 and in1
+ INPUTS
+ in0, in1 - torch.Tensor object of shape Nx3xXxY - image patch scaled to [-1,1]
+ OUTPUT
+ computed distances between in0 and in1
+ '''
+
+ return self.net.forward(in0, in1, retPerLayer=retPerLayer)
+
+ # ***** TRAINING FUNCTIONS *****
+ def optimize_parameters(self):
+ self.forward_train()
+ self.optimizer_net.zero_grad()
+ self.backward_train()
+ self.optimizer_net.step()
+ self.clamp_weights()
+
+ def clamp_weights(self):
+ for module in self.net.modules():
+ if(hasattr(module, 'weight') and module.kernel_size==(1,1)):
+ module.weight.data = torch.clamp(module.weight.data,min=0)
+
+ def set_input(self, data):
+ self.input_ref = data['ref']
+ self.input_p0 = data['p0']
+ self.input_p1 = data['p1']
+ self.input_judge = data['judge']
+
+ if(self.use_gpu):
+ self.input_ref = self.input_ref.to(device=self.gpu_ids[0])
+ self.input_p0 = self.input_p0.to(device=self.gpu_ids[0])
+ self.input_p1 = self.input_p1.to(device=self.gpu_ids[0])
+ self.input_judge = self.input_judge.to(device=self.gpu_ids[0])
+
+ self.var_ref = Variable(self.input_ref,requires_grad=True)
+ self.var_p0 = Variable(self.input_p0,requires_grad=True)
+ self.var_p1 = Variable(self.input_p1,requires_grad=True)
+
+ def forward_train(self): # run forward pass
+ # print(self.net.module.scaling_layer.shift)
+ # print(torch.norm(self.net.module.net.slice1[0].weight).item(), torch.norm(self.net.module.lin0.model[1].weight).item())
+
+ self.d0 = self.forward(self.var_ref, self.var_p0)
+ self.d1 = self.forward(self.var_ref, self.var_p1)
+ self.acc_r = self.compute_accuracy(self.d0,self.d1,self.input_judge)
+
+ self.var_judge = Variable(1.*self.input_judge).view(self.d0.size())
+
+ self.loss_total = self.rankLoss.forward(self.d0, self.d1, self.var_judge*2.-1.)
+
+ return self.loss_total
+
+ def backward_train(self):
+ torch.mean(self.loss_total).backward()
+
+ def compute_accuracy(self,d0,d1,judge):
+ ''' d0, d1 are Variables, judge is a Tensor '''
+ d1_lt_d0 = (d1 %f' % (type,self.old_lr, lr))
+ self.old_lr = lr
+
+def score_2afc_dataset(data_loader, func, name=''):
+ ''' Function computes Two Alternative Forced Choice (2AFC) score using
+ distance function 'func' in dataset 'data_loader'
+ INPUTS
+ data_loader - CustomDatasetDataLoader object - contains a TwoAFCDataset inside
+ func - callable distance function - calling d=func(in0,in1) should take 2
+ pytorch tensors with shape Nx3xXxY, and return numpy array of length N
+ OUTPUTS
+ [0] - 2AFC score in [0,1], fraction of time func agrees with human evaluators
+ [1] - dictionary with following elements
+ d0s,d1s - N arrays containing distances between reference patch to perturbed patches
+ gts - N array in [0,1], preferred patch selected by human evaluators
+ (closer to "0" for left patch p0, "1" for right patch p1,
+ "0.6" means 60pct people preferred right patch, 40pct preferred left)
+ scores - N array in [0,1], corresponding to what percentage function agreed with humans
+ CONSTS
+ N - number of test triplets in data_loader
+ '''
+
+ d0s = []
+ d1s = []
+ gts = []
+
+ for data in tqdm(data_loader.load_data(), desc=name):
+ d0s+=func(data['ref'],data['p0']).data.cpu().numpy().flatten().tolist()
+ d1s+=func(data['ref'],data['p1']).data.cpu().numpy().flatten().tolist()
+ gts+=data['judge'].cpu().numpy().flatten().tolist()
+
+ d0s = np.array(d0s)
+ d1s = np.array(d1s)
+ gts = np.array(gts)
+ scores = (d0s 256:
+ self.feat_512 = UpBlockComp(nfc[256], nfc[512])
+ self.se_512 = SEBlock(nfc[32], nfc[512])
+ if im_size > 512:
+ self.feat_1024 = UpBlock(nfc[512], nfc[1024])
+
+ def forward(self, input):
+
+ feat_4 = self.init(input)
+ feat_8 = self.feat_8(feat_4)
+ feat_16 = self.feat_16(feat_8)
+ feat_32 = self.feat_32(feat_16)
+
+ feat_64 = self.se_64( feat_4, self.feat_64(feat_32) )
+
+ feat_128 = self.se_128( feat_8, self.feat_128(feat_64) )
+
+ feat_256 = self.se_256( feat_16, self.feat_256(feat_128) )
+
+ if self.im_size == 256:
+ return [self.to_big(feat_256), self.to_128(feat_128)]
+
+ feat_512 = self.se_512( feat_32, self.feat_512(feat_256) )
+ if self.im_size == 512:
+ return [self.to_big(feat_512), self.to_128(feat_128)]
+
+ feat_1024 = self.feat_1024(feat_512)
+
+ im_128 = torch.tanh(self.to_128(feat_128))
+ im_1024 = torch.tanh(self.to_big(feat_1024))
+
+ return [im_1024, im_128]
+
+
+class DownBlock(nn.Module):
+ def __init__(self, in_planes, out_planes):
+ super(DownBlock, self).__init__()
+
+ self.main = nn.Sequential(
+ conv2d(in_planes, out_planes, 4, 2, 1, bias=False),
+ batchNorm2d(out_planes), nn.LeakyReLU(0.2, inplace=True),
+ )
+
+ def forward(self, feat):
+ return self.main(feat)
+
+
+class DownBlockComp(nn.Module):
+ def __init__(self, in_planes, out_planes):
+ super(DownBlockComp, self).__init__()
+
+ self.main = nn.Sequential(
+ conv2d(in_planes, out_planes, 4, 2, 1, bias=False),
+ batchNorm2d(out_planes), nn.LeakyReLU(0.2, inplace=True),
+ conv2d(out_planes, out_planes, 3, 1, 1, bias=False),
+ batchNorm2d(out_planes), nn.LeakyReLU(0.2)
+ )
+
+ self.direct = nn.Sequential(
+ nn.AvgPool2d(2, 2),
+ conv2d(in_planes, out_planes, 1, 1, 0, bias=False),
+ batchNorm2d(out_planes), nn.LeakyReLU(0.2))
+
+ def forward(self, feat):
+ return (self.main(feat) + self.direct(feat)) / 2
+
+
+class Discriminator(nn.Module):
+ def __init__(self, ndf=64, nc=3, im_size=512):
+ super(Discriminator, self).__init__()
+ self.ndf = ndf
+ self.im_size = im_size
+
+ nfc_multi = {4:16, 8:16, 16:8, 32:4, 64:2, 128:1, 256:0.5, 512:0.25, 1024:0.125}
+ nfc = {}
+ for k, v in nfc_multi.items():
+ nfc[k] = int(v*ndf)
+
+ if im_size == 1024:
+ self.down_from_big = nn.Sequential(
+ conv2d(nc, nfc[1024], 4, 2, 1, bias=False),
+ nn.LeakyReLU(0.2, inplace=True),
+ conv2d(nfc[1024], nfc[512], 4, 2, 1, bias=False),
+ batchNorm2d(nfc[512]),
+ nn.LeakyReLU(0.2, inplace=True))
+ elif im_size == 512:
+ self.down_from_big = nn.Sequential(
+ conv2d(nc, nfc[512], 4, 2, 1, bias=False),
+ nn.LeakyReLU(0.2, inplace=True) )
+ elif im_size == 256:
+ self.down_from_big = nn.Sequential(
+ conv2d(nc, nfc[512], 3, 1, 1, bias=False),
+ nn.LeakyReLU(0.2, inplace=True) )
+
+ self.down_4 = DownBlockComp(nfc[512], nfc[256])
+ self.down_8 = DownBlockComp(nfc[256], nfc[128])
+ self.down_16 = DownBlockComp(nfc[128], nfc[64])
+ self.down_32 = DownBlockComp(nfc[64], nfc[32])
+ self.down_64 = DownBlockComp(nfc[32], nfc[16])
+
+ self.rf_big = nn.Sequential(
+ conv2d(nfc[16] , nfc[8], 1, 1, 0, bias=False),
+ batchNorm2d(nfc[8]), nn.LeakyReLU(0.2, inplace=True),
+ conv2d(nfc[8], 1, 4, 1, 0, bias=False))
+
+ self.se_2_16 = SEBlock(nfc[512], nfc[64])
+ self.se_4_32 = SEBlock(nfc[256], nfc[32])
+ self.se_8_64 = SEBlock(nfc[128], nfc[16])
+
+ self.down_from_small = nn.Sequential(
+ conv2d(nc, nfc[256], 4, 2, 1, bias=False),
+ nn.LeakyReLU(0.2, inplace=True),
+ DownBlock(nfc[256], nfc[128]),
+ DownBlock(nfc[128], nfc[64]),
+ DownBlock(nfc[64], nfc[32]), )
+
+ self.rf_small = conv2d(nfc[32], 1, 4, 1, 0, bias=False)
+
+ self.decoder_big = SimpleDecoder(nfc[16], nc)
+ self.decoder_part = SimpleDecoder(nfc[32], nc)
+ self.decoder_small = SimpleDecoder(nfc[32], nc)
+
+ def forward(self, imgs, label, part=None):
+ if type(imgs) is not list:
+ imgs = [F.interpolate(imgs, size=self.im_size), F.interpolate(imgs, size=128)]
+
+ feat_2 = self.down_from_big(imgs[0])
+ feat_4 = self.down_4(feat_2)
+ feat_8 = self.down_8(feat_4)
+
+ feat_16 = self.down_16(feat_8)
+ feat_16 = self.se_2_16(feat_2, feat_16)
+
+ feat_32 = self.down_32(feat_16)
+ feat_32 = self.se_4_32(feat_4, feat_32)
+
+ feat_last = self.down_64(feat_32)
+ feat_last = self.se_8_64(feat_8, feat_last)
+
+ #rf_0 = torch.cat([self.rf_big_1(feat_last).view(-1),self.rf_big_2(feat_last).view(-1)])
+ #rff_big = torch.sigmoid(self.rf_factor_big)
+ rf_0 = self.rf_big(feat_last).view(-1)
+
+ feat_small = self.down_from_small(imgs[1])
+ #rf_1 = torch.cat([self.rf_small_1(feat_small).view(-1),self.rf_small_2(feat_small).view(-1)])
+ rf_1 = self.rf_small(feat_small).view(-1)
+
+ if label=='real':
+ rec_img_big = self.decoder_big(feat_last)
+ rec_img_small = self.decoder_small(feat_small)
+
+ assert part is not None
+ rec_img_part = None
+ if part==0:
+ rec_img_part = self.decoder_part(feat_32[:,:,:8,:8])
+ if part==1:
+ rec_img_part = self.decoder_part(feat_32[:,:,:8,8:])
+ if part==2:
+ rec_img_part = self.decoder_part(feat_32[:,:,8:,:8])
+ if part==3:
+ rec_img_part = self.decoder_part(feat_32[:,:,8:,8:])
+
+ return torch.cat([rf_0, rf_1]) , [rec_img_big, rec_img_small, rec_img_part]
+
+ return torch.cat([rf_0, rf_1])
+
+
+class SimpleDecoder(nn.Module):
+ """docstring for CAN_SimpleDecoder"""
+ def __init__(self, nfc_in=64, nc=3):
+ super(SimpleDecoder, self).__init__()
+
+ nfc_multi = {4:16, 8:8, 16:4, 32:2, 64:2, 128:1, 256:0.5, 512:0.25, 1024:0.125}
+ nfc = {}
+ for k, v in nfc_multi.items():
+ nfc[k] = int(v*32)
+
+ def upBlock(in_planes, out_planes):
+ block = nn.Sequential(
+ nn.Upsample(scale_factor=2, mode='nearest'),
+ conv2d(in_planes, out_planes*2, 3, 1, 1, bias=False),
+ batchNorm2d(out_planes*2), GLU())
+ return block
+
+ self.main = nn.Sequential( nn.AdaptiveAvgPool2d(8),
+ upBlock(nfc_in, nfc[16]) ,
+ upBlock(nfc[16], nfc[32]),
+ upBlock(nfc[32], nfc[64]),
+ upBlock(nfc[64], nfc[128]),
+ conv2d(nfc[128], nc, 3, 1, 1, bias=False),
+ nn.Tanh() )
+
+ def forward(self, input):
+ # input shape: c x 4 x 4
+ return self.main(input)
+
+from random import randint
+def random_crop(image, size):
+ h, w = image.shape[2:]
+ ch = randint(0, h-size-1)
+ cw = randint(0, w-size-1)
+ return image[:,:,ch:ch+size,cw:cw+size]
+
+class TextureDiscriminator(nn.Module):
+ def __init__(self, ndf=64, nc=3, im_size=512):
+ super(TextureDiscriminator, self).__init__()
+ self.ndf = ndf
+ self.im_size = im_size
+
+ nfc_multi = {4:16, 8:8, 16:8, 32:4, 64:2, 128:1, 256:0.5, 512:0.25, 1024:0.125}
+ nfc = {}
+ for k, v in nfc_multi.items():
+ nfc[k] = int(v*ndf)
+
+ self.down_from_small = nn.Sequential(
+ conv2d(nc, nfc[256], 4, 2, 1, bias=False),
+ nn.LeakyReLU(0.2, inplace=True),
+ DownBlock(nfc[256], nfc[128]),
+ DownBlock(nfc[128], nfc[64]),
+ DownBlock(nfc[64], nfc[32]), )
+ self.rf_small = nn.Sequential(
+ conv2d(nfc[16], 1, 4, 1, 0, bias=False))
+
+ self.decoder_small = SimpleDecoder(nfc[32], nc)
+
+ def forward(self, img, label):
+ img = random_crop(img, size=128)
+
+ feat_small = self.down_from_small(img)
+ rf = self.rf_small(feat_small).view(-1)
+
+ if label=='real':
+ rec_img_small = self.decoder_small(feat_small)
+
+ return rf, rec_img_small, img
+
+ return rf
\ No newline at end of file
diff --git a/operation.py b/operation.py
new file mode 100644
index 0000000000000000000000000000000000000000..73a6b5e06c7352f0a4499718201deb8110f7f6b7
--- /dev/null
+++ b/operation.py
@@ -0,0 +1,146 @@
+import os
+import numpy as np
+import torch
+import torch.utils.data as data
+from torch.utils.data import Dataset
+from PIL import Image
+from copy import deepcopy
+import shutil
+import json
+
+def InfiniteSampler(n):
+ """Data sampler"""
+ # check if the number of samples is valid
+ if n <= 0:
+ raise ValueError(f"Invalid number of samples: {n}.\nMake sure that images are present in the given path.")
+ i = n - 1
+ order = np.random.permutation(n)
+ while True:
+ yield order[i]
+ i += 1
+ if i >= n:
+ np.random.seed()
+ order = np.random.permutation(n)
+ i = 0
+
+
+class InfiniteSamplerWrapper(data.sampler.Sampler):
+ """Data sampler wrapper"""
+ def __init__(self, data_source):
+ self.num_samples = len(data_source)
+
+ def __iter__(self):
+ return iter(InfiniteSampler(self.num_samples))
+
+ def __len__(self):
+ return 2 ** 31
+
+
+def copy_G_params(model):
+ flatten = deepcopy(list(p.data for p in model.parameters()))
+ return flatten
+
+
+def load_params(model, new_param):
+ for p, new_p in zip(model.parameters(), new_param):
+ p.data.copy_(new_p)
+
+
+def get_dir(args):
+
+ if not os.path.exists(args.output_path):
+ os.makedirs(args.output_path)
+
+ task_name = os.path.join(args.output_path, 'train_results', args.name)
+ saved_model_folder = os.path.join(task_name, 'models')
+ saved_image_folder = os.path.join(task_name, 'images')
+
+ os.makedirs(saved_model_folder, exist_ok=True)
+ os.makedirs(saved_image_folder, exist_ok=True)
+
+ for f in os.listdir('./'):
+ if '.py' in f:
+ shutil.copy(f, os.path.join(task_name, f))
+
+ with open(os.path.join(saved_model_folder, '../args.txt'), 'w') as f:
+ json.dump(args.__dict__, f, indent=2)
+
+ return saved_model_folder, saved_image_folder
+
+
+
+
+class ImageFolder(Dataset):
+ """docstring for ArtDataset"""
+ def __init__(self, root, transform=None):
+ super( ImageFolder, self).__init__()
+ self.root = root
+
+ self.frame = self._parse_frame()
+ self.transform = transform
+
+ def _parse_frame(self):
+ frame = []
+ img_names = os.listdir(self.root)
+ img_names.sort()
+ for i in range(len(img_names)):
+ image_path = os.path.join(self.root, img_names[i])
+ if image_path[-4:] == '.jpg' or image_path[-4:] == '.png' or image_path[-5:] == '.jpeg':
+ frame.append(image_path)
+ return frame
+
+ def __len__(self):
+ return len(self.frame)
+
+ def __getitem__(self, idx):
+ file = self.frame[idx]
+ img = Image.open(file).convert('RGB')
+
+ if self.transform:
+ img = self.transform(img)
+
+ return img
+
+
+
+from io import BytesIO
+import lmdb
+from torch.utils.data import Dataset
+
+
+class MultiResolutionDataset(Dataset):
+ def __init__(self, path, transform, resolution=256):
+ self.env = lmdb.open(
+ path,
+ max_readers=32,
+ readonly=True,
+ lock=False,
+ readahead=False,
+ meminit=False,
+ )
+
+ if not self.env:
+ raise IOError('Cannot open lmdb dataset', path)
+
+ with self.env.begin(write=False) as txn:
+ self.length = int(txn.get('length'.encode('utf-8')).decode('utf-8'))
+
+ self.resolution = resolution
+ self.transform = transform
+
+ def __len__(self):
+ return self.length
+
+ def __getitem__(self, index):
+ with self.env.begin(write=False) as txn:
+ key = f'{self.resolution}-{str(index).zfill(5)}'.encode('utf-8')
+ img_bytes = txn.get(key)
+ #key_asp = f'aspect_ratio-{str(index).zfill(5)}'.encode('utf-8')
+ #aspect_ratio = float(txn.get(key_asp).decode())
+
+ buffer = BytesIO(img_bytes)
+ img = Image.open(buffer)
+ img = self.transform(img)
+
+ return img
+
diff --git a/output/train_results/test1/args.txt b/output/train_results/test1/args.txt
new file mode 100644
index 0000000000000000000000000000000000000000..c35e592ec82c088893305aefa07e45af975aadd0
--- /dev/null
+++ b/output/train_results/test1/args.txt
@@ -0,0 +1,13 @@
+{
+ "path": "/content/run-FastGAN-pytorch/dataset1",
+ "output_path": "/content/run-FastGAN-pytorch/output",
+ "cuda": 0,
+ "name": "test1",
+ "iter": 50000,
+ "start_iter": 0,
+ "batch_size": 8,
+ "im_size": 1024,
+ "ckpt": "None",
+ "workers": 2,
+ "save_interval": 100
+}
\ No newline at end of file
diff --git a/output/train_results/test1/diffaug.py b/output/train_results/test1/diffaug.py
new file mode 100644
index 0000000000000000000000000000000000000000..54c0894f9109451acd61e27e84e97dc9eaec5616
--- /dev/null
+++ b/output/train_results/test1/diffaug.py
@@ -0,0 +1,76 @@
+# Differentiable Augmentation for Data-Efficient GAN Training
+# Shengyu Zhao, Zhijian Liu, Ji Lin, Jun-Yan Zhu, and Song Han
+# https://arxiv.org/pdf/2006.10738
+
+import torch
+import torch.nn.functional as F
+
+
+def DiffAugment(x, policy='', channels_first=True):
+ if policy:
+ if not channels_first:
+ x = x.permute(0, 3, 1, 2)
+ for p in policy.split(','):
+ for f in AUGMENT_FNS[p]:
+ x = f(x)
+ if not channels_first:
+ x = x.permute(0, 2, 3, 1)
+ x = x.contiguous()
+ return x
+
+
+def rand_brightness(x):
+ x = x + (torch.rand(x.size(0), 1, 1, 1, dtype=x.dtype, device=x.device) - 0.5)
+ return x
+
+
+def rand_saturation(x):
+ x_mean = x.mean(dim=1, keepdim=True)
+ x = (x - x_mean) * (torch.rand(x.size(0), 1, 1, 1, dtype=x.dtype, device=x.device) * 2) + x_mean
+ return x
+
+
+def rand_contrast(x):
+ x_mean = x.mean(dim=[1, 2, 3], keepdim=True)
+ x = (x - x_mean) * (torch.rand(x.size(0), 1, 1, 1, dtype=x.dtype, device=x.device) + 0.5) + x_mean
+ return x
+
+
+def rand_translation(x, ratio=0.125):
+ shift_x, shift_y = int(x.size(2) * ratio + 0.5), int(x.size(3) * ratio + 0.5)
+ translation_x = torch.randint(-shift_x, shift_x + 1, size=[x.size(0), 1, 1], device=x.device)
+ translation_y = torch.randint(-shift_y, shift_y + 1, size=[x.size(0), 1, 1], device=x.device)
+ grid_batch, grid_x, grid_y = torch.meshgrid(
+ torch.arange(x.size(0), dtype=torch.long, device=x.device),
+ torch.arange(x.size(2), dtype=torch.long, device=x.device),
+ torch.arange(x.size(3), dtype=torch.long, device=x.device),
+ )
+ grid_x = torch.clamp(grid_x + translation_x + 1, 0, x.size(2) + 1)
+ grid_y = torch.clamp(grid_y + translation_y + 1, 0, x.size(3) + 1)
+ x_pad = F.pad(x, [1, 1, 1, 1, 0, 0, 0, 0])
+ x = x_pad.permute(0, 2, 3, 1).contiguous()[grid_batch, grid_x, grid_y].permute(0, 3, 1, 2)
+ return x
+
+
+def rand_cutout(x, ratio=0.5):
+ cutout_size = int(x.size(2) * ratio + 0.5), int(x.size(3) * ratio + 0.5)
+ offset_x = torch.randint(0, x.size(2) + (1 - cutout_size[0] % 2), size=[x.size(0), 1, 1], device=x.device)
+ offset_y = torch.randint(0, x.size(3) + (1 - cutout_size[1] % 2), size=[x.size(0), 1, 1], device=x.device)
+ grid_batch, grid_x, grid_y = torch.meshgrid(
+ torch.arange(x.size(0), dtype=torch.long, device=x.device),
+ torch.arange(cutout_size[0], dtype=torch.long, device=x.device),
+ torch.arange(cutout_size[1], dtype=torch.long, device=x.device),
+ )
+ grid_x = torch.clamp(grid_x + offset_x - cutout_size[0] // 2, min=0, max=x.size(2) - 1)
+ grid_y = torch.clamp(grid_y + offset_y - cutout_size[1] // 2, min=0, max=x.size(3) - 1)
+ mask = torch.ones(x.size(0), x.size(2), x.size(3), dtype=x.dtype, device=x.device)
+ mask[grid_batch, grid_x, grid_y] = 0
+ x = x * mask.unsqueeze(1)
+ return x
+
+
+AUGMENT_FNS = {
+ 'color': [rand_brightness, rand_saturation, rand_contrast],
+ 'translation': [rand_translation],
+ 'cutout': [rand_cutout],
+}
\ No newline at end of file
diff --git a/output/train_results/test1/eval.py b/output/train_results/test1/eval.py
new file mode 100644
index 0000000000000000000000000000000000000000..e25899d648f2a85e468e4087b21a8b7b351f7ecb
--- /dev/null
+++ b/output/train_results/test1/eval.py
@@ -0,0 +1,92 @@
+import torch
+from torch import nn
+from torch import optim
+import torch.nn.functional as F
+from torchvision.datasets import ImageFolder
+from torch.utils.data import DataLoader
+from torchvision import utils as vutils
+
+import os
+import random
+import argparse
+from tqdm import tqdm
+
+from models import Generator
+
+
+def load_params(model, new_param):
+ for p, new_p in zip(model.parameters(), new_param):
+ p.data.copy_(new_p)
+
+def resize(img,size=256):
+ return F.interpolate(img, size=size)
+
+def batch_generate(zs, netG, batch=8):
+ g_images = []
+ with torch.no_grad():
+ for i in range(len(zs)//batch):
+ g_images.append( netG(zs[i*batch:(i+1)*batch]).cpu() )
+ if len(zs)%batch>0:
+ g_images.append( netG(zs[-(len(zs)%batch):]).cpu() )
+ return torch.cat(g_images)
+
+def batch_save(images, folder_name):
+ if not os.path.exists(folder_name):
+ os.mkdir(folder_name)
+ for i, image in enumerate(images):
+ vutils.save_image(image.add(1).mul(0.5), folder_name+'/%d.jpg'%i)
+
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(
+ description='generate images'
+ )
+ parser.add_argument('--ckpt', type=str)
+ parser.add_argument('--artifacts', type=str, default=".", help='path to artifacts.')
+ parser.add_argument('--cuda', type=int, default=0, help='index of gpu to use')
+ parser.add_argument('--start_iter', type=int, default=6)
+ parser.add_argument('--end_iter', type=int, default=10)
+
+ parser.add_argument('--dist', type=str, default='.')
+ parser.add_argument('--size', type=int, default=256)
+ parser.add_argument('--batch', default=16, type=int, help='batch size')
+ parser.add_argument('--n_sample', type=int, default=2000)
+ parser.add_argument('--big', action='store_true')
+ parser.add_argument('--im_size', type=int, default=1024)
+ parser.add_argument('--multiplier', type=int, default=10000, help='multiplier for model number')
+ parser.set_defaults(big=False)
+ args = parser.parse_args()
+
+ noise_dim = 256
+ device = torch.device('cuda:%d'%(args.cuda))
+
+ net_ig = Generator( ngf=64, nz=noise_dim, nc=3, im_size=args.im_size)#, big=args.big )
+ net_ig.to(device)
+
+ for epoch in [args.multiplier*i for i in range(args.start_iter, args.end_iter+1)]:
+ ckpt = f"{args.artifacts}/models/{epoch}.pth"
+ checkpoint = torch.load(ckpt, map_location=lambda a,b: a)
+ # Remove prefix `module`.
+ checkpoint['g'] = {k.replace('module.', ''): v for k, v in checkpoint['g'].items()}
+ net_ig.load_state_dict(checkpoint['g'])
+ #load_params(net_ig, checkpoint['g_ema'])
+
+ #net_ig.eval()
+ print('load checkpoint success, epoch %d'%epoch)
+
+ net_ig.to(device)
+
+ del checkpoint
+
+ dist = 'eval_%d'%(epoch)
+ dist = os.path.join(dist, 'img')
+ os.makedirs(dist, exist_ok=True)
+
+ with torch.no_grad():
+ for i in tqdm(range(args.n_sample//args.batch)):
+ noise = torch.randn(args.batch, noise_dim).to(device)
+ g_imgs = net_ig(noise)[0]
+ g_imgs = resize(g_imgs,args.im_size) # resize the image using given dimension
+ for j, g_img in enumerate( g_imgs ):
+ vutils.save_image(g_img.add(1).mul(0.5),
+ os.path.join(dist, '%d.png'%(i*args.batch+j)))#, normalize=True, range=(-1,1))
diff --git a/output/train_results/test1/images/0.jpg b/output/train_results/test1/images/0.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..8b5372d9777b0b40932783dbf78b30552a6ad9db
--- /dev/null
+++ b/output/train_results/test1/images/0.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5ddcd7505ceafadb02b82306a1bf6724cd6dd93d906756a8bf765299e04878c1
+size 1473936
diff --git a/output/train_results/test1/images/rec_0.jpg b/output/train_results/test1/images/rec_0.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ca8d42256cc3e19a1bf390e9a9ab296ed4c067cc
--- /dev/null
+++ b/output/train_results/test1/images/rec_0.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:06d8bdf2f933b5c775103fa6f0aa143a72810ae9256a36e99c334d8122e295b3
+size 147804
diff --git a/output/train_results/test1/models.py b/output/train_results/test1/models.py
new file mode 100644
index 0000000000000000000000000000000000000000..c8db23a556436154593907c86183626db4d0ba1c
--- /dev/null
+++ b/output/train_results/test1/models.py
@@ -0,0 +1,385 @@
+import torch
+import torch.nn as nn
+from torch.nn.utils import spectral_norm
+import torch.nn.functional as F
+
+import random
+
+seq = nn.Sequential
+
+def weights_init(m):
+ classname = m.__class__.__name__
+ if classname.find('Conv') != -1:
+ try:
+ m.weight.data.normal_(0.0, 0.02)
+ except:
+ pass
+ elif classname.find('BatchNorm') != -1:
+ m.weight.data.normal_(1.0, 0.02)
+ m.bias.data.fill_(0)
+
+def conv2d(*args, **kwargs):
+ return spectral_norm(nn.Conv2d(*args, **kwargs))
+
+def convTranspose2d(*args, **kwargs):
+ return spectral_norm(nn.ConvTranspose2d(*args, **kwargs))
+
+def batchNorm2d(*args, **kwargs):
+ return nn.BatchNorm2d(*args, **kwargs)
+
+def linear(*args, **kwargs):
+ return spectral_norm(nn.Linear(*args, **kwargs))
+
+class PixelNorm(nn.Module):
+ def forward(self, input):
+ return input * torch.rsqrt(torch.mean(input ** 2, dim=1, keepdim=True) + 1e-8)
+
+class Reshape(nn.Module):
+ def __init__(self, shape):
+ super().__init__()
+ self.target_shape = shape
+
+ def forward(self, feat):
+ batch = feat.shape[0]
+ return feat.view(batch, *self.target_shape)
+
+
+class GLU(nn.Module):
+ def forward(self, x):
+ nc = x.size(1)
+ assert nc % 2 == 0, 'channels dont divide 2!'
+ nc = int(nc/2)
+ return x[:, :nc] * torch.sigmoid(x[:, nc:])
+
+
+class NoiseInjection(nn.Module):
+ def __init__(self):
+ super().__init__()
+
+ self.weight = nn.Parameter(torch.zeros(1), requires_grad=True)
+
+ def forward(self, feat, noise=None):
+ if noise is None:
+ batch, _, height, width = feat.shape
+ noise = torch.randn(batch, 1, height, width).to(feat.device)
+
+ return feat + self.weight * noise
+
+
+class Swish(nn.Module):
+ def forward(self, feat):
+ return feat * torch.sigmoid(feat)
+
+
+class SEBlock(nn.Module):
+ def __init__(self, ch_in, ch_out):
+ super().__init__()
+
+ self.main = nn.Sequential( nn.AdaptiveAvgPool2d(4),
+ conv2d(ch_in, ch_out, 4, 1, 0, bias=False), Swish(),
+ conv2d(ch_out, ch_out, 1, 1, 0, bias=False), nn.Sigmoid() )
+
+ def forward(self, feat_small, feat_big):
+ return feat_big * self.main(feat_small)
+
+
+class InitLayer(nn.Module):
+ def __init__(self, nz, channel):
+ super().__init__()
+
+ self.init = nn.Sequential(
+ convTranspose2d(nz, channel*2, 4, 1, 0, bias=False),
+ batchNorm2d(channel*2), GLU() )
+
+ def forward(self, noise):
+ noise = noise.view(noise.shape[0], -1, 1, 1)
+ return self.init(noise)
+
+
+def UpBlock(in_planes, out_planes):
+ block = nn.Sequential(
+ nn.Upsample(scale_factor=2, mode='nearest'),
+ conv2d(in_planes, out_planes*2, 3, 1, 1, bias=False),
+ #convTranspose2d(in_planes, out_planes*2, 4, 2, 1, bias=False),
+ batchNorm2d(out_planes*2), GLU())
+ return block
+
+
+def UpBlockComp(in_planes, out_planes):
+ block = nn.Sequential(
+ nn.Upsample(scale_factor=2, mode='nearest'),
+ conv2d(in_planes, out_planes*2, 3, 1, 1, bias=False),
+ #convTranspose2d(in_planes, out_planes*2, 4, 2, 1, bias=False),
+ NoiseInjection(),
+ batchNorm2d(out_planes*2), GLU(),
+ conv2d(out_planes, out_planes*2, 3, 1, 1, bias=False),
+ NoiseInjection(),
+ batchNorm2d(out_planes*2), GLU()
+ )
+ return block
+
+
+class Generator(nn.Module):
+ def __init__(self, ngf=64, nz=100, nc=3, im_size=1024):
+ super(Generator, self).__init__()
+
+ nfc_multi = {4:16, 8:8, 16:4, 32:2, 64:2, 128:1, 256:0.5, 512:0.25, 1024:0.125}
+ nfc = {}
+ for k, v in nfc_multi.items():
+ nfc[k] = int(v*ngf)
+
+ self.im_size = im_size
+
+ self.init = InitLayer(nz, channel=nfc[4])
+
+ self.feat_8 = UpBlockComp(nfc[4], nfc[8])
+ self.feat_16 = UpBlock(nfc[8], nfc[16])
+ self.feat_32 = UpBlockComp(nfc[16], nfc[32])
+ self.feat_64 = UpBlock(nfc[32], nfc[64])
+ self.feat_128 = UpBlockComp(nfc[64], nfc[128])
+ self.feat_256 = UpBlock(nfc[128], nfc[256])
+
+ self.se_64 = SEBlock(nfc[4], nfc[64])
+ self.se_128 = SEBlock(nfc[8], nfc[128])
+ self.se_256 = SEBlock(nfc[16], nfc[256])
+
+ self.to_128 = conv2d(nfc[128], nc, 1, 1, 0, bias=False)
+ self.to_big = conv2d(nfc[im_size], nc, 3, 1, 1, bias=False)
+
+ if im_size > 256:
+ self.feat_512 = UpBlockComp(nfc[256], nfc[512])
+ self.se_512 = SEBlock(nfc[32], nfc[512])
+ if im_size > 512:
+ self.feat_1024 = UpBlock(nfc[512], nfc[1024])
+
+ def forward(self, input):
+
+ feat_4 = self.init(input)
+ feat_8 = self.feat_8(feat_4)
+ feat_16 = self.feat_16(feat_8)
+ feat_32 = self.feat_32(feat_16)
+
+ feat_64 = self.se_64( feat_4, self.feat_64(feat_32) )
+
+ feat_128 = self.se_128( feat_8, self.feat_128(feat_64) )
+
+ feat_256 = self.se_256( feat_16, self.feat_256(feat_128) )
+
+ if self.im_size == 256:
+ return [self.to_big(feat_256), self.to_128(feat_128)]
+
+ feat_512 = self.se_512( feat_32, self.feat_512(feat_256) )
+ if self.im_size == 512:
+ return [self.to_big(feat_512), self.to_128(feat_128)]
+
+ feat_1024 = self.feat_1024(feat_512)
+
+ im_128 = torch.tanh(self.to_128(feat_128))
+ im_1024 = torch.tanh(self.to_big(feat_1024))
+
+ return [im_1024, im_128]
+
+
+class DownBlock(nn.Module):
+ def __init__(self, in_planes, out_planes):
+ super(DownBlock, self).__init__()
+
+ self.main = nn.Sequential(
+ conv2d(in_planes, out_planes, 4, 2, 1, bias=False),
+ batchNorm2d(out_planes), nn.LeakyReLU(0.2, inplace=True),
+ )
+
+ def forward(self, feat):
+ return self.main(feat)
+
+
+class DownBlockComp(nn.Module):
+ def __init__(self, in_planes, out_planes):
+ super(DownBlockComp, self).__init__()
+
+ self.main = nn.Sequential(
+ conv2d(in_planes, out_planes, 4, 2, 1, bias=False),
+ batchNorm2d(out_planes), nn.LeakyReLU(0.2, inplace=True),
+ conv2d(out_planes, out_planes, 3, 1, 1, bias=False),
+ batchNorm2d(out_planes), nn.LeakyReLU(0.2)
+ )
+
+ self.direct = nn.Sequential(
+ nn.AvgPool2d(2, 2),
+ conv2d(in_planes, out_planes, 1, 1, 0, bias=False),
+ batchNorm2d(out_planes), nn.LeakyReLU(0.2))
+
+ def forward(self, feat):
+ return (self.main(feat) + self.direct(feat)) / 2
+
+
+class Discriminator(nn.Module):
+ def __init__(self, ndf=64, nc=3, im_size=512):
+ super(Discriminator, self).__init__()
+ self.ndf = ndf
+ self.im_size = im_size
+
+ nfc_multi = {4:16, 8:16, 16:8, 32:4, 64:2, 128:1, 256:0.5, 512:0.25, 1024:0.125}
+ nfc = {}
+ for k, v in nfc_multi.items():
+ nfc[k] = int(v*ndf)
+
+ if im_size == 1024:
+ self.down_from_big = nn.Sequential(
+ conv2d(nc, nfc[1024], 4, 2, 1, bias=False),
+ nn.LeakyReLU(0.2, inplace=True),
+ conv2d(nfc[1024], nfc[512], 4, 2, 1, bias=False),
+ batchNorm2d(nfc[512]),
+ nn.LeakyReLU(0.2, inplace=True))
+ elif im_size == 512:
+ self.down_from_big = nn.Sequential(
+ conv2d(nc, nfc[512], 4, 2, 1, bias=False),
+ nn.LeakyReLU(0.2, inplace=True) )
+ elif im_size == 256:
+ self.down_from_big = nn.Sequential(
+ conv2d(nc, nfc[512], 3, 1, 1, bias=False),
+ nn.LeakyReLU(0.2, inplace=True) )
+
+ self.down_4 = DownBlockComp(nfc[512], nfc[256])
+ self.down_8 = DownBlockComp(nfc[256], nfc[128])
+ self.down_16 = DownBlockComp(nfc[128], nfc[64])
+ self.down_32 = DownBlockComp(nfc[64], nfc[32])
+ self.down_64 = DownBlockComp(nfc[32], nfc[16])
+
+ self.rf_big = nn.Sequential(
+ conv2d(nfc[16] , nfc[8], 1, 1, 0, bias=False),
+ batchNorm2d(nfc[8]), nn.LeakyReLU(0.2, inplace=True),
+ conv2d(nfc[8], 1, 4, 1, 0, bias=False))
+
+ self.se_2_16 = SEBlock(nfc[512], nfc[64])
+ self.se_4_32 = SEBlock(nfc[256], nfc[32])
+ self.se_8_64 = SEBlock(nfc[128], nfc[16])
+
+ self.down_from_small = nn.Sequential(
+ conv2d(nc, nfc[256], 4, 2, 1, bias=False),
+ nn.LeakyReLU(0.2, inplace=True),
+ DownBlock(nfc[256], nfc[128]),
+ DownBlock(nfc[128], nfc[64]),
+ DownBlock(nfc[64], nfc[32]), )
+
+ self.rf_small = conv2d(nfc[32], 1, 4, 1, 0, bias=False)
+
+ self.decoder_big = SimpleDecoder(nfc[16], nc)
+ self.decoder_part = SimpleDecoder(nfc[32], nc)
+ self.decoder_small = SimpleDecoder(nfc[32], nc)
+
+ def forward(self, imgs, label, part=None):
+ if type(imgs) is not list:
+ imgs = [F.interpolate(imgs, size=self.im_size), F.interpolate(imgs, size=128)]
+
+ feat_2 = self.down_from_big(imgs[0])
+ feat_4 = self.down_4(feat_2)
+ feat_8 = self.down_8(feat_4)
+
+ feat_16 = self.down_16(feat_8)
+ feat_16 = self.se_2_16(feat_2, feat_16)
+
+ feat_32 = self.down_32(feat_16)
+ feat_32 = self.se_4_32(feat_4, feat_32)
+
+ feat_last = self.down_64(feat_32)
+ feat_last = self.se_8_64(feat_8, feat_last)
+
+ #rf_0 = torch.cat([self.rf_big_1(feat_last).view(-1),self.rf_big_2(feat_last).view(-1)])
+ #rff_big = torch.sigmoid(self.rf_factor_big)
+ rf_0 = self.rf_big(feat_last).view(-1)
+
+ feat_small = self.down_from_small(imgs[1])
+ #rf_1 = torch.cat([self.rf_small_1(feat_small).view(-1),self.rf_small_2(feat_small).view(-1)])
+ rf_1 = self.rf_small(feat_small).view(-1)
+
+ if label=='real':
+ rec_img_big = self.decoder_big(feat_last)
+ rec_img_small = self.decoder_small(feat_small)
+
+ assert part is not None
+ rec_img_part = None
+ if part==0:
+ rec_img_part = self.decoder_part(feat_32[:,:,:8,:8])
+ if part==1:
+ rec_img_part = self.decoder_part(feat_32[:,:,:8,8:])
+ if part==2:
+ rec_img_part = self.decoder_part(feat_32[:,:,8:,:8])
+ if part==3:
+ rec_img_part = self.decoder_part(feat_32[:,:,8:,8:])
+
+ return torch.cat([rf_0, rf_1]) , [rec_img_big, rec_img_small, rec_img_part]
+
+ return torch.cat([rf_0, rf_1])
+
+
+class SimpleDecoder(nn.Module):
+ """docstring for CAN_SimpleDecoder"""
+ def __init__(self, nfc_in=64, nc=3):
+ super(SimpleDecoder, self).__init__()
+
+ nfc_multi = {4:16, 8:8, 16:4, 32:2, 64:2, 128:1, 256:0.5, 512:0.25, 1024:0.125}
+ nfc = {}
+ for k, v in nfc_multi.items():
+ nfc[k] = int(v*32)
+
+ def upBlock(in_planes, out_planes):
+ block = nn.Sequential(
+ nn.Upsample(scale_factor=2, mode='nearest'),
+ conv2d(in_planes, out_planes*2, 3, 1, 1, bias=False),
+ batchNorm2d(out_planes*2), GLU())
+ return block
+
+ self.main = nn.Sequential( nn.AdaptiveAvgPool2d(8),
+ upBlock(nfc_in, nfc[16]) ,
+ upBlock(nfc[16], nfc[32]),
+ upBlock(nfc[32], nfc[64]),
+ upBlock(nfc[64], nfc[128]),
+ conv2d(nfc[128], nc, 3, 1, 1, bias=False),
+ nn.Tanh() )
+
+ def forward(self, input):
+ # input shape: c x 4 x 4
+ return self.main(input)
+
+from random import randint
+def random_crop(image, size):
+ h, w = image.shape[2:]
+ ch = randint(0, h-size-1)
+ cw = randint(0, w-size-1)
+ return image[:,:,ch:ch+size,cw:cw+size]
+
+class TextureDiscriminator(nn.Module):
+ def __init__(self, ndf=64, nc=3, im_size=512):
+ super(TextureDiscriminator, self).__init__()
+ self.ndf = ndf
+ self.im_size = im_size
+
+ nfc_multi = {4:16, 8:8, 16:8, 32:4, 64:2, 128:1, 256:0.5, 512:0.25, 1024:0.125}
+ nfc = {}
+ for k, v in nfc_multi.items():
+ nfc[k] = int(v*ndf)
+
+ self.down_from_small = nn.Sequential(
+ conv2d(nc, nfc[256], 4, 2, 1, bias=False),
+ nn.LeakyReLU(0.2, inplace=True),
+ DownBlock(nfc[256], nfc[128]),
+ DownBlock(nfc[128], nfc[64]),
+ DownBlock(nfc[64], nfc[32]), )
+ self.rf_small = nn.Sequential(
+ conv2d(nfc[16], 1, 4, 1, 0, bias=False))
+
+ self.decoder_small = SimpleDecoder(nfc[32], nc)
+
+ def forward(self, img, label):
+ img = random_crop(img, size=128)
+
+ feat_small = self.down_from_small(img)
+ rf = self.rf_small(feat_small).view(-1)
+
+ if label=='real':
+ rec_img_small = self.decoder_small(feat_small)
+
+ return rf, rec_img_small, img
+
+ return rf
\ No newline at end of file
diff --git a/output/train_results/test1/models/0.pth b/output/train_results/test1/models/0.pth
new file mode 100644
index 0000000000000000000000000000000000000000..9e6355b1df5e8383699266a50aafb9c740e01d42
--- /dev/null
+++ b/output/train_results/test1/models/0.pth
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0e36698fbb645bae99d8d65e9e2ad71f03d5ad0dfd80fc8f22aecb9f1b8ef588
+size 163591922
diff --git a/output/train_results/test1/models/all_0.pth b/output/train_results/test1/models/all_0.pth
new file mode 100644
index 0000000000000000000000000000000000000000..b70b67f7a593e71f630210a572efec4139c646b9
--- /dev/null
+++ b/output/train_results/test1/models/all_0.pth
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0be2b3fe0f0621a831893e0b943d83d748d0d33c11d57b89f802e50748fde257
+size 606070570
diff --git a/output/train_results/test1/operation.py b/output/train_results/test1/operation.py
new file mode 100644
index 0000000000000000000000000000000000000000..73a6b5e06c7352f0a4499718201deb8110f7f6b7
--- /dev/null
+++ b/output/train_results/test1/operation.py
@@ -0,0 +1,146 @@
+import os
+import numpy as np
+import torch
+import torch.utils.data as data
+from torch.utils.data import Dataset
+from PIL import Image
+from copy import deepcopy
+import shutil
+import json
+
+def InfiniteSampler(n):
+ """Data sampler"""
+ # check if the number of samples is valid
+ if n <= 0:
+ raise ValueError(f"Invalid number of samples: {n}.\nMake sure that images are present in the given path.")
+ i = n - 1
+ order = np.random.permutation(n)
+ while True:
+ yield order[i]
+ i += 1
+ if i >= n:
+ np.random.seed()
+ order = np.random.permutation(n)
+ i = 0
+
+
+class InfiniteSamplerWrapper(data.sampler.Sampler):
+ """Data sampler wrapper"""
+ def __init__(self, data_source):
+ self.num_samples = len(data_source)
+
+ def __iter__(self):
+ return iter(InfiniteSampler(self.num_samples))
+
+ def __len__(self):
+ return 2 ** 31
+
+
+def copy_G_params(model):
+ flatten = deepcopy(list(p.data for p in model.parameters()))
+ return flatten
+
+
+def load_params(model, new_param):
+ for p, new_p in zip(model.parameters(), new_param):
+ p.data.copy_(new_p)
+
+
+def get_dir(args):
+
+ if not os.path.exists(args.output_path):
+ os.makedirs(args.output_path)
+
+ task_name = os.path.join(args.output_path, 'train_results', args.name)
+ saved_model_folder = os.path.join(task_name, 'models')
+ saved_image_folder = os.path.join(task_name, 'images')
+
+ os.makedirs(saved_model_folder, exist_ok=True)
+ os.makedirs(saved_image_folder, exist_ok=True)
+
+ for f in os.listdir('./'):
+ if '.py' in f:
+ shutil.copy(f, os.path.join(task_name, f))
+
+ with open(os.path.join(saved_model_folder, '../args.txt'), 'w') as f:
+ json.dump(args.__dict__, f, indent=2)
+
+ return saved_model_folder, saved_image_folder
+
+
+
+
+class ImageFolder(Dataset):
+ """docstring for ArtDataset"""
+ def __init__(self, root, transform=None):
+ super( ImageFolder, self).__init__()
+ self.root = root
+
+ self.frame = self._parse_frame()
+ self.transform = transform
+
+ def _parse_frame(self):
+ frame = []
+ img_names = os.listdir(self.root)
+ img_names.sort()
+ for i in range(len(img_names)):
+ image_path = os.path.join(self.root, img_names[i])
+ if image_path[-4:] == '.jpg' or image_path[-4:] == '.png' or image_path[-5:] == '.jpeg':
+ frame.append(image_path)
+ return frame
+
+ def __len__(self):
+ return len(self.frame)
+
+ def __getitem__(self, idx):
+ file = self.frame[idx]
+ img = Image.open(file).convert('RGB')
+
+ if self.transform:
+ img = self.transform(img)
+
+ return img
+
+
+
+from io import BytesIO
+import lmdb
+from torch.utils.data import Dataset
+
+
+class MultiResolutionDataset(Dataset):
+ def __init__(self, path, transform, resolution=256):
+ self.env = lmdb.open(
+ path,
+ max_readers=32,
+ readonly=True,
+ lock=False,
+ readahead=False,
+ meminit=False,
+ )
+
+ if not self.env:
+ raise IOError('Cannot open lmdb dataset', path)
+
+ with self.env.begin(write=False) as txn:
+ self.length = int(txn.get('length'.encode('utf-8')).decode('utf-8'))
+
+ self.resolution = resolution
+ self.transform = transform
+
+ def __len__(self):
+ return self.length
+
+ def __getitem__(self, index):
+ with self.env.begin(write=False) as txn:
+ key = f'{self.resolution}-{str(index).zfill(5)}'.encode('utf-8')
+ img_bytes = txn.get(key)
+ #key_asp = f'aspect_ratio-{str(index).zfill(5)}'.encode('utf-8')
+ #aspect_ratio = float(txn.get(key_asp).decode())
+
+ buffer = BytesIO(img_bytes)
+ img = Image.open(buffer)
+ img = self.transform(img)
+
+ return img
+
diff --git a/output/train_results/test1/train.py b/output/train_results/test1/train.py
new file mode 100644
index 0000000000000000000000000000000000000000..6d7ad18d2a1751fd27d805177b2819043bc94d6d
--- /dev/null
+++ b/output/train_results/test1/train.py
@@ -0,0 +1,205 @@
+import torch
+from torch import nn
+import torch.optim as optim
+import torch.nn.functional as F
+from torch.utils.data.dataloader import DataLoader
+from torchvision import transforms
+from torchvision import utils as vutils
+
+import argparse
+import random
+from tqdm import tqdm
+
+from models import weights_init, Discriminator, Generator
+from operation import copy_G_params, load_params, get_dir
+from operation import ImageFolder, InfiniteSamplerWrapper
+from diffaug import DiffAugment
+policy = 'color,translation'
+import lpips
+percept = lpips.PerceptualLoss(model='net-lin', net='vgg', use_gpu=True)
+
+
+#torch.backends.cudnn.benchmark = True
+
+def crop_image_by_part(image, part):
+ hw = image.shape[2]//2
+ if part==0:
+ return image[:,:,:hw,:hw]
+ if part==1:
+ return image[:,:,:hw,hw:]
+ if part==2:
+ return image[:,:,hw:,:hw]
+ if part==3:
+ return image[:,:,hw:,hw:]
+
+def train_d(net, data, label="real"):
+ """Train function of discriminator"""
+ if label=="real":
+ part = random.randint(0, 3)
+ pred, [rec_all, rec_small, rec_part] = net(data, label, part=part)
+ err = F.relu( torch.rand_like(pred) * 0.2 + 0.8 - pred).mean() + \
+ percept( rec_all, F.interpolate(data, rec_all.shape[2]) ).sum() +\
+ percept( rec_small, F.interpolate(data, rec_small.shape[2]) ).sum() +\
+ percept( rec_part, F.interpolate(crop_image_by_part(data, part), rec_part.shape[2]) ).sum()
+ err.backward()
+ return pred.mean().item(), rec_all, rec_small, rec_part
+ else:
+ pred = net(data, label)
+ err = F.relu( torch.rand_like(pred) * 0.2 + 0.8 + pred).mean()
+ err.backward()
+ return pred.mean().item()
+
+
+def train(args):
+
+ data_root = args.path
+ total_iterations = args.iter
+ checkpoint = args.ckpt
+ batch_size = args.batch_size
+ im_size = args.im_size
+ ndf = 64
+ ngf = 64
+ nz = 256
+ nlr = 0.0002
+ nbeta1 = 0.5
+ use_cuda = True
+ multi_gpu = True
+ dataloader_workers = args.workers
+ current_iteration = args.start_iter
+ save_interval = args.save_interval
+ saved_model_folder, saved_image_folder = get_dir(args)
+
+
+ device = torch.device("cpu")
+ if use_cuda:
+ device = torch.device("cuda:0")
+
+ transform_list = [
+ transforms.Resize((int(im_size),int(im_size))),
+ transforms.RandomHorizontalFlip(),
+ transforms.ToTensor(),
+ transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])
+ ]
+ trans = transforms.Compose(transform_list)
+
+ if 'lmdb' in data_root:
+ from operation import MultiResolutionDataset
+ dataset = MultiResolutionDataset(data_root, trans, 1024)
+ else:
+ dataset = ImageFolder(root=data_root, transform=trans)
+
+
+ dataloader = iter(DataLoader(dataset, batch_size=batch_size, shuffle=False,
+ sampler=InfiniteSamplerWrapper(dataset), num_workers=dataloader_workers, pin_memory=True))
+ '''
+ loader = MultiEpochsDataLoader(dataset, batch_size=batch_size,
+ shuffle=True, num_workers=dataloader_workers,
+ pin_memory=True)
+ dataloader = CudaDataLoader(loader, 'cuda')
+ '''
+
+
+ #from model_s import Generator, Discriminator
+ netG = Generator(ngf=ngf, nz=nz, im_size=im_size)
+ netG.apply(weights_init)
+
+ netD = Discriminator(ndf=ndf, im_size=im_size)
+ netD.apply(weights_init)
+
+ netG.to(device)
+ netD.to(device)
+
+ avg_param_G = copy_G_params(netG)
+
+ fixed_noise = torch.FloatTensor(8, nz).normal_(0, 1).to(device)
+
+ optimizerG = optim.Adam(netG.parameters(), lr=nlr, betas=(nbeta1, 0.999))
+ optimizerD = optim.Adam(netD.parameters(), lr=nlr, betas=(nbeta1, 0.999))
+
+ if checkpoint != 'None':
+ ckpt = torch.load(checkpoint)
+ netG.load_state_dict({k.replace('module.', ''): v for k, v in ckpt['g'].items()})
+ netD.load_state_dict({k.replace('module.', ''): v for k, v in ckpt['d'].items()})
+ avg_param_G = ckpt['g_ema']
+ optimizerG.load_state_dict(ckpt['opt_g'])
+ optimizerD.load_state_dict(ckpt['opt_d'])
+ current_iteration = int(checkpoint.split('_')[-1].split('.')[0])
+ del ckpt
+
+ if multi_gpu:
+ netG = nn.DataParallel(netG.to(device))
+ netD = nn.DataParallel(netD.to(device))
+
+ for iteration in tqdm(range(current_iteration, total_iterations+1)):
+ real_image = next(dataloader)
+ real_image = real_image.to(device)
+ current_batch_size = real_image.size(0)
+ noise = torch.Tensor(current_batch_size, nz).normal_(0, 1).to(device)
+
+ fake_images = netG(noise)
+
+ real_image = DiffAugment(real_image, policy=policy)
+ fake_images = [DiffAugment(fake, policy=policy) for fake in fake_images]
+
+ ## 2. train Discriminator
+ netD.zero_grad()
+
+ err_dr, rec_img_all, rec_img_small, rec_img_part = train_d(netD, real_image, label="real")
+ train_d(netD, [fi.detach() for fi in fake_images], label="fake")
+ optimizerD.step()
+
+ ## 3. train Generator
+ netG.zero_grad()
+ pred_g = netD(fake_images, "fake")
+ err_g = -pred_g.mean()
+
+ err_g.backward()
+ optimizerG.step()
+
+ for p, avg_p in zip(netG.parameters(), avg_param_G):
+ avg_p.mul_(0.999).add_(0.001 * p.data)
+
+ if iteration % 100 == 0:
+ print("GAN: loss d: %.5f loss g: %.5f"%(err_dr, -err_g.item()))
+
+ if iteration % (save_interval*10) == 0:
+ backup_para = copy_G_params(netG)
+ load_params(netG, avg_param_G)
+ with torch.no_grad():
+ vutils.save_image(netG(fixed_noise)[0].add(1).mul(0.5), saved_image_folder+'/%d.jpg'%iteration, nrow=4)
+ vutils.save_image( torch.cat([
+ F.interpolate(real_image, 128),
+ rec_img_all, rec_img_small,
+ rec_img_part]).add(1).mul(0.5), saved_image_folder+'/rec_%d.jpg'%iteration )
+ load_params(netG, backup_para)
+
+ if iteration % (save_interval*50) == 0 or iteration == total_iterations:
+ backup_para = copy_G_params(netG)
+ load_params(netG, avg_param_G)
+ torch.save({'g':netG.state_dict(),'d':netD.state_dict()}, saved_model_folder+'/%d.pth'%iteration)
+ load_params(netG, backup_para)
+ torch.save({'g':netG.state_dict(),
+ 'd':netD.state_dict(),
+ 'g_ema': avg_param_G,
+ 'opt_g': optimizerG.state_dict(),
+ 'opt_d': optimizerD.state_dict()}, saved_model_folder+'/all_%d.pth'%iteration)
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(description='region gan')
+
+ parser.add_argument('--path', type=str, default='../lmdbs/art_landscape_1k', help='path of resource dataset, should be a folder that has one or many sub image folders inside')
+ parser.add_argument('--output_path', type=str, default='./', help='Output path for the train results')
+ parser.add_argument('--cuda', type=int, default=0, help='index of gpu to use')
+ parser.add_argument('--name', type=str, default='test1', help='experiment name')
+ parser.add_argument('--iter', type=int, default=50000, help='number of iterations')
+ parser.add_argument('--start_iter', type=int, default=0, help='the iteration to start training')
+ parser.add_argument('--batch_size', type=int, default=8, help='mini batch number of images')
+ parser.add_argument('--im_size', type=int, default=1024, help='image resolution')
+ parser.add_argument('--ckpt', type=str, default='None', help='checkpoint weight path if have one')
+ parser.add_argument('--workers', type=int, default=2, help='number of workers for dataloader')
+ parser.add_argument('--save_interval', type=int, default=100, help='number of iterations to save model')
+
+ args = parser.parse_args()
+ print(args)
+
+ train(args)
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000000000000000000000000000000000000..cb5385a2c1bf0463c73f78d16f8e0fea9c06e3a0
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,11 @@
+torch==2.0.0
+pandas==1.5.3
+numpy==1.23.5
+tqdm==4.64.1
+scipy==1.10.1
+scikit-image==0.20.0
+ipdb==0.13.3
+lmdb==1.4.1
+opencv-python==4.5.4.60
+easing-functions==1.0.4
+torchvision==0.15.1
diff --git a/scripts/find_nearest_neighbor.py b/scripts/find_nearest_neighbor.py
new file mode 100644
index 0000000000000000000000000000000000000000..5d59e9d95c2c34ad8e5f9ff59844ff5dec292059
--- /dev/null
+++ b/scripts/find_nearest_neighbor.py
@@ -0,0 +1,87 @@
+from eval import load_params
+import torch
+from torch import nn
+from torch import optim
+import torch.nn.functional as F
+from torchvision.datasets import ImageFolder
+from torch.utils.data import DataLoader
+from torchvision import utils as vutils
+from torchvision import transforms
+import os
+import random
+import argparse
+from tqdm import tqdm
+
+from models import Generator
+from operation import load_params, InfiniteSamplerWrapper
+
+noise_dim = 256
+device = torch.device('cuda:%d'%(0))
+
+im_size = 512
+net_ig = Generator( ngf=64, nz=noise_dim, nc=3, im_size=im_size)#, big=args.big )
+net_ig.to(device)
+
+epoch = 50000
+ckpt = './models/all_%d.pth'%(epoch)
+checkpoint = torch.load(ckpt, map_location=lambda a,b: a)
+net_ig.load_state_dict(checkpoint['g'])
+load_params(net_ig, checkpoint['g_ema'])
+
+batch = 8
+noise = torch.randn(batch, noise_dim).to(device)
+g_imgs = net_ig(noise)[0]
+
+vutils.save_image(g_imgs.add(1).mul(0.5),
+ os.path.join('./', '%d.png'%(2)))
+
+
+transform_list = [
+ transforms.Resize((int(256),int(256))),
+ transforms.ToTensor(),
+ transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])
+ ]
+trans = transforms.Compose(transform_list)
+data_root = '/media/database/images/first_1k'
+dataset = ImageFolder(root=data_root, transform=trans)
+
+import lpips
+percept = lpips.PerceptualLoss(model='net-lin', net='vgg', use_gpu=True)
+
+the_image = g_imgs[0].unsqueeze(0)
+def find_closest(the_image):
+ the_image = F.interpolate(the_image, size=256)
+ small = 100
+ close_image = None
+ for i in tqdm(range(len(dataset))):
+ real_iamge = dataset[i][0].unsqueeze(0).to(device)
+
+ dis = percept(the_image, real_iamge).sum()
+ if dis < small:
+ small = dis
+ close_image = real_iamge
+ return close_image, small
+
+all_dist = []
+batch = 8
+result_path = 'nn_track'
+import os
+os.makedirs(result_path, exist_ok=True)
+for j in range(8):
+ with torch.no_grad():
+ noise = torch.randn(batch, noise_dim).to(device)
+ g_imgs = net_ig(noise)[0]
+
+ for n in range(batch):
+ the_image = g_imgs[n].unsqueeze(0)
+
+ close_0, dis = find_closest(the_image)
+
+ vutils.save_image(torch.cat([F.interpolate(the_image,256), close_0]).add(1).mul(0.5), \
+ result_path+'/nn_%d.jpg'%(j*batch+n))
+ all_dist.append(dis.view(1))
+
+new_all_dist = []
+for v in all_dist:
+ new_all_dist.append(v.view(1))
+print(torch.cat(new_all_dist).mean())
\ No newline at end of file
diff --git a/scripts/generate_video.py b/scripts/generate_video.py
new file mode 100644
index 0000000000000000000000000000000000000000..a720889cd6b65e817255641b74797efe7fc748d2
--- /dev/null
+++ b/scripts/generate_video.py
@@ -0,0 +1,221 @@
+from easing_functions.easing import LinearInOut
+import torch
+import pandas as pd
+from torchvision import utils as vutils
+import os
+import cv2
+from tqdm import tqdm
+from scipy import io
+import numpy as np
+import argparse
+
+from easing_functions import QuadEaseInOut
+from easing_functions import SineEaseIn, SineEaseInOut, SineEaseOut
+from easing_functions import ElasticEaseIn, ElasticEaseInOut, ElasticEaseOut
+
+ease_fn_dict = {'QuadEaseInOut': QuadEaseInOut,
+ 'SineEaseIn': SineEaseIn,
+ 'SineEaseInOut': SineEaseInOut,
+ 'SineEaseOut': SineEaseOut,
+ 'ElasticEaseIn': ElasticEaseIn,
+ 'ElasticEaseInOut': ElasticEaseInOut,
+ 'ElasticEaseOut': ElasticEaseOut,
+ 'Linear': LinearInOut}
+
+def interpolate(z1, z2, num_interp):
+ # this is a "first frame included, last frame excluded" interpolation
+ w = torch.linspace(0, 1, num_interp+1)
+ interp_zs = []
+ for n in range(num_interp):
+ interp_zs.append( (z2*w[n].item() + z1*(1-w[n].item())).unsqueeze(0) )
+ return torch.cat(interp_zs)
+
+
+
+def interpolate_ease_inout(z1, z2, num_interp, ease_fn, model_type='freeform'):
+ # this is a "first frame included, last frame excluded" interpolation
+ w = ease_fn(start=0, end=1, duration=num_interp+1)
+ interp_zs = []
+
+ # just to make sure the latent vectors in the right shape
+ if model_type == 'freeform':
+ z1 = z1.view(1, -1)
+ z2 = z2.view(1, -1)
+ if model_type == 'stylegan2':
+ if type(z1) is list:
+ z1 = [z1[0].view(1, -1), z1[1].view(1, -1)]
+ else:
+ z1 = [z1.view(1, -1), z1.view(1, -1)]
+ if type(z2) is list:
+ z2 = [z2[0].view(1, -1), z2[1].view(1, -1)]
+ else:
+ z2 = [z2.view(1, -1), z2.view(1, -1)]
+
+ for n in range(num_interp):
+ if model_type == 'freeform':
+ interp_zs.append( z2*w.ease(n) + z1*(1-w.ease(n)) )
+ if model_type == 'stylegan2':
+ interp_zs.append( [ z2[0]*w.ease(n) + z1[0]*(1-w.ease(n)),
+ z2[1]*w.ease(n) + z1[1]*(1-w.ease(n)) ] )
+ return interp_zs
+
+@torch.no_grad()
+def net_generate(netG, z, model_type='freeform', im_size=1024):
+
+ if model_type == 'stylegan2':
+ z_contents = []
+ z_styles = []
+ for zidx in range(len(z)):
+ z_contents.append(z[zidx][0])
+ z_styles.append(z[zidx][1])
+ z = [ torch.cat(z_contents), torch.cat(z_styles) ]
+ gimg = netG( z, inject_index=8, input_is_latent=True, randomize_noise=False )[0].cpu()
+ elif model_type == 'freeform':
+ z = torch.cat(z)
+ gimg = netG(z)[0].cpu()
+
+ return torch.nn.functional.interpolate(gimg, im_size)
+
+def batch_generate_and_save(netG, zs, folder_name, batch_size=8, model_type='freeform', im_size=1024):
+ # zs is a list of vectors if model is freeform
+ # zs is a list of lists, each list is 2 vectors, if model is stylegan
+ t = 0
+ num = 0
+ if len(zs) < batch_size:
+ gimgs = net_generate(netG, zs, model_type, im_size=im_size).cpu()
+ for image in gimgs:
+ vutils.save_image( image.add(1).mul(0.5), folder_name+"/%d.jpg"%(num) )
+ num += 1
+
+ for k in tqdm(range(len(zs)//batch_size)):
+ gimgs = net_generate(netG, zs[k*batch_size:(k+1)*batch_size], model_type, im_size=im_size)
+ for image in gimgs:
+ vutils.save_image( image.add(1).mul(0.5), folder_name+"/%d.jpg"%(num) )
+ num += 1
+ t = k
+
+ if len(zs)%batch_size>0:
+ gimgs = net_generate(netG, zs[(t+1)*batch_size:], model_type, im_size=im_size)
+ for image in gimgs:
+ vutils.save_image( image.add(1).mul(0.5), folder_name+"/%d.jpg"%(num) )
+ num += 1
+
+
+
+def batch_save(images, folder_name, start_num=0):
+ os.makedirs(folder_name, exist_ok=True)
+ num = start_num
+ for image in images:
+ vutils.save_image( image.add(1).mul(0.5), folder_name+"/%d.jpg"%(num) )
+ num += 1
+
+
+def read_img_and_make_video(dist, video_name, fps):
+ img_array = []
+ for i in tqdm(range(len(os.listdir(dist)))):
+ try:
+ filename = dist+'/%d.jpg'%(i)
+ img = cv2.imread(filename)
+ height, width, layers = img.shape
+ size = (width,height)
+ img_array.append(img)
+ except:
+ print('error at: %d'%i)
+
+ if '.mp4' not in video_name:
+ video_name += '.mp4'
+ out = cv2.VideoWriter(video_name,cv2.VideoWriter_fourcc(*'mp4v'), fps, size)
+ for i in range(len(img_array)):
+ out.write(img_array[i])
+ out.release()
+
+from shutil import rmtree
+
+def make_video_from_latents(net, selected_latents, frames_dist_folder, video_name, fps, video_length, ease_fn, model_type, im_size=1024):
+ # selected_latents: the latent noise of user selected key-frame images, it is a list
+ # each item in the list is a vector if the model is freeform,
+ # each item in the list is a list of two vectors if the model is stylegan2
+ # frames_dist_folder: the folder path to save the generated images to make the video
+ # fps: is the frames we generate per second
+ # video_length: is the time of the video, in seconds. For example: 30 means a video length of 30 seconds
+ # ease_fn: user selected type of transitions between each key-frame
+
+ # first calculate how many images need to generate
+ try:
+ rmtree(frames_dist_folder)
+ except:
+ pass
+ os.makedirs(frames_dist_folder, exist_ok=True)
+
+ nbr_generate = fps*video_length
+ nbr_keyframe = len(selected_latents)
+ nbr_interpolation = 1 + nbr_generate // (nbr_keyframe - 1)
+
+
+ main_zs = []
+ for idx in range(nbr_keyframe-1):
+ main_zs += interpolate_ease_inout(selected_latents[idx],
+ selected_latents[idx+1], nbr_interpolation, ease_fn, model_type)
+
+
+ print('generating images ...')
+ batch_generate_and_save(net, main_zs, folder_name=frames_dist_folder, batch_size=8, model_type=model_type, im_size=im_size)
+ print('making videos ...')
+ read_img_and_make_video(frames_dist_folder, video_name, fps=fps)
+
+
+if __name__ == "__main__":
+
+
+ device = torch.device('cuda:%d'%(0))
+
+ load_model_err = 0
+
+ from models import Generator as Generator_freeform
+
+ frames_dist_folder = 'project_video_frames' # a folder to save generated images
+ ckpt_path = './time_1024_1/models/180000.pth' # path to the checkpoint
+ video_name = 'videl_keyframe_15' # name of the generated video
+
+ model_type = 'freeform'
+ net = Generator_freeform(ngf=64, nz=100)
+ net.load_state_dict(torch.load(ckpt_path)['g'])
+ net.to(device)
+ net.eval()
+
+
+ try:
+ rmtree(frames_dist_folder)
+ except:
+ pass
+ os.makedirs(frames_dist_folder, exist_ok=True)
+
+ fps = 30
+ minutes = 1
+ im_size = 1024
+
+ ease_fn=ease_fn_dict['SineEaseInOut']
+
+ init_kf_nbr = 15
+ nbr_key_frames_per_minute = [init_kf_nbr-i for i in range(minutes)]
+ nbr_key_frames_total = sum(nbr_key_frames_per_minute)
+ noises = torch.randn( nbr_key_frames_total , 100).to(device)
+ user_selected_noises = [n for n in noises]
+ nbr_interpolation_list = [[fps*60//nbr_kf]*nbr_kf for nbr_kf in nbr_key_frames_per_minute]
+ nbl = []
+ for nb in nbr_interpolation_list:
+ nbl += nb
+
+ print(len(nbl))
+ print(len(user_selected_noises))# , print("mismatch size")
+ main_zs = []
+ for idx in range(len(user_selected_noises)-1):
+ main_zs += interpolate_ease_inout(user_selected_noises[idx],
+ user_selected_noises[idx+1], nbl[idx], ease_fn, model_type)
+ for idx in range(100):
+ main_zs.append(main_zs[-1])
+ print('generating images ...')
+ batch_generate_and_save(net, main_zs, folder_name=frames_dist_folder, batch_size=8, model_type=model_type, im_size=im_size)
+ print('making videos ...')
+ read_img_and_make_video(frames_dist_folder, video_name, fps=fps)
+
diff --git a/scripts/style_mix.py b/scripts/style_mix.py
new file mode 100644
index 0000000000000000000000000000000000000000..0164992c6e4ca9263d31ff1c5799479b4f139a2a
--- /dev/null
+++ b/scripts/style_mix.py
@@ -0,0 +1,102 @@
+import torch
+from torch import nn
+import torch.optim as optim
+import torch.nn.functional as F
+from torch.utils.data.dataloader import DataLoader
+from torchvision import transforms
+from torchvision import utils as vutils
+
+import argparse
+from tqdm import tqdm
+
+from models import weights_init, Discriminator, Generator
+from operation import copy_G_params, load_params, get_dir
+from operation import ImageFolder, InfiniteSamplerWrapper
+from diffaug import DiffAugment
+
+
+
+ndf = 64
+ngf = 64
+nz = 256
+nlr = 0.0002
+nbeta1 = 0.5
+use_cuda = True
+multi_gpu = False
+dataloader_workers = 8
+current_iteration = 0
+save_interval = 100
+device = 'cuda:0'
+im_size = 256
+
+
+netG = Generator(ngf=ngf, nz=nz, im_size=im_size)
+netG.apply(weights_init)
+
+netD = Discriminator(ndf=ndf, im_size=im_size)
+netD.apply(weights_init)
+
+netG.to(device)
+netD.to(device)
+
+avg_param_G = copy_G_params(netG)
+
+fixed_noise = torch.FloatTensor(8, nz).normal_(0, 1).to(device)
+
+optimizerG = optim.Adam(netG.parameters(), lr=nlr, betas=(nbeta1, 0.999))
+optimizerD = optim.Adam(netD.parameters(), lr=nlr, betas=(nbeta1, 0.999))
+
+j = 4
+checkpoint = "./models/all_%d.pth"%(j*10000)
+ckpt = torch.load(checkpoint)
+netG.load_state_dict(ckpt['g'])
+netD.load_state_dict(ckpt['d'])
+avg_param_G = ckpt['g_ema']
+load_params(netG, avg_param_G)
+
+bs = 8
+noise_a = torch.randn(bs, nz).to(device)
+noise_b = torch.randn(bs, nz).to(device)
+
+def get_early_features(net, noise):
+ feat_4 = net.init(noise)
+ feat_8 = net.feat_8(feat_4)
+ feat_16 = net.feat_16(feat_8)
+ feat_32 = net.feat_32(feat_16)
+ feat_64 = net.feat_64(feat_32)
+ return feat_8, feat_16, feat_32, feat_64
+
+def get_late_features(net, im_size, feat_64, feat_8, feat_16, feat_32):
+ feat_128 = net.feat_128(feat_64)
+ feat_128 = net.se_128(feat_8, feat_128)
+
+ feat_256 = net.feat_256(feat_128)
+ feat_256 = net.se_256(feat_16, feat_256)
+ if im_size==256:
+ return net.to_big(feat_256)
+
+ feat_512 = net.feat_512(feat_256)
+ feat_512 = net.se_512(feat_32, feat_512)
+ if im_size==512:
+ return net.to_big(feat_512)
+
+ feat_1024 = net.feat_1024(feat_512)
+ return net.to_big(feat_1024)
+
+
+feat_8_a, feat_16_a, feat_32_a, feat_64_a = get_early_features(netG, noise_a)
+feat_8_b, feat_16_b, feat_32_b, feat_64_b = get_early_features(netG, noise_b)
+
+images_b = get_late_features(netG, im_size, feat_64_b, feat_8_b, feat_16_b, feat_32_b)
+images_a = get_late_features(netG, im_size, feat_64_a, feat_8_a, feat_16_a, feat_32_a)
+
+imgs = [ torch.ones(1, 3, im_size, im_size) ]
+imgs.append(images_b.cpu())
+for i in range(bs):
+ imgs.append(images_a[i].unsqueeze(0).cpu())
+
+ gimgs = get_late_features(netG, im_size, feat_64_a[i].unsqueeze(0).repeat(bs, 1, 1, 1), feat_8_b, feat_16_b, feat_32_b)
+ imgs.append(gimgs.cpu())
+
+imgs = torch.cat(imgs)
+vutils.save_image(imgs.add(1).mul(0.5), 'style_mix_1.jpg', nrow=bs+1)
\ No newline at end of file
diff --git a/scripts/train_backtracking_all.py b/scripts/train_backtracking_all.py
new file mode 100644
index 0000000000000000000000000000000000000000..a1f55b9ba65a942f99dfb7ae285fb6bd099899f7
--- /dev/null
+++ b/scripts/train_backtracking_all.py
@@ -0,0 +1,175 @@
+import torch
+from torch import nn, real, select
+import torch.optim as optim
+import torch.nn.functional as F
+from torch.utils.data.dataloader import DataLoader
+from torchvision import transforms
+from torchvision import utils as vutils
+
+import argparse
+from tqdm import tqdm
+
+from models import weights_init, Discriminator, Generator, SimpleDecoder
+from operation import copy_G_params, load_params, get_dir
+from operation import ImageFolder, InfiniteSamplerWrapper
+from diffaug import DiffAugment
+policy = 'color,translation'
+import lpips
+percept = lpips.PerceptualLoss(model='net-lin', net='vgg', use_gpu=True)
+
+
+#torch.backends.cudnn.benchmark = True
+
+
+def crop_image_by_part(image, part):
+ hw = image.shape[2]//2
+ if part==0:
+ return image[:,:,:hw,:hw]
+ if part==1:
+ return image[:,:,:hw,hw:]
+ if part==2:
+ return image[:,:,hw:,:hw]
+ if part==3:
+ return image[:,:,hw:,hw:]
+
+def train_d(net, data, label="real"):
+ """Train function of discriminator"""
+ if label=="real":
+ #pred, [rec_all, rec_small, rec_part], part = net(data, label)
+ pred = net(data, label)
+ err = F.relu( torch.rand_like(pred) * 0.2 + 0.8 - pred).mean() #+ \
+ #percept( rec_all, F.interpolate(data, rec_all.shape[2]) ).sum() +\
+ #percept( rec_small, F.interpolate(data, rec_small.shape[2]) ).sum() +\
+ #percept( rec_part, F.interpolate(crop_image_by_part(data, part), rec_part.shape[2]) ).sum()
+ err.backward()
+ return pred.mean().item()#, rec_all, rec_small, rec_part
+ else:
+ pred = net(data, label)
+ err = F.relu( torch.rand_like(pred) * 0.2 + 0.8 + pred).mean()
+ err.backward()
+ return pred.mean().item()
+
+@torch.no_grad()
+def interpolate(z1, z2, netG, img_name, step=8):
+ z = [ a*z2 + (1-a)*z1 for a in torch.linspace(0, 1, steps=step) ]
+ z = torch.cat(z).view(step, -1)
+ g_image = netG(z)[0]
+ vutils.save_image( g_image.add(1).mul(0.5), img_name , nrow=step)
+
+
+def train(args):
+
+ data_root = args.path
+ total_iterations = args.iter
+ checkpoint = args.ckpt
+ batch_size = args.batch_size
+ im_size = args.im_size
+ ndf = 64
+ ngf = 64
+ nz = 256
+ nlr = 0.0002
+ nbeta1 = 0.5
+ use_cuda = True
+ multi_gpu = False
+ dataloader_workers = 8
+ current_iteration = 0
+ save_interval = 100
+ saved_model_folder, saved_image_folder = get_dir(args)
+
+ device = torch.device("cpu")
+ if use_cuda:
+ device = torch.device("cuda:0")
+
+ transform_list = [
+ transforms.Resize((int(im_size),int(im_size))),
+ transforms.RandomHorizontalFlip(),
+ transforms.ToTensor(),
+ transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])
+ ]
+ trans = transforms.Compose(transform_list)
+
+ dataset = ImageFolder(root=data_root, transform=trans, return_idx=True)
+ dataloader = iter(DataLoader(dataset, batch_size=batch_size, shuffle=False,
+ sampler=InfiniteSamplerWrapper(dataset), num_workers=dataloader_workers, pin_memory=True))
+
+ total_iterations = int(len(dataset)*100/batch_size)
+
+ netG = Generator(ngf=ngf, nz=nz, im_size=im_size)
+
+
+ ckpt = torch.load(checkpoint)
+ load_params( netG , ckpt['g_ema'] )
+ #netG.eval()
+ netG.to(device)
+
+ fixed_noise = torch.randn(len(dataset), nz, requires_grad=True, device=device)
+ optimizerG = optim.Adam([fixed_noise], lr=0.1, betas=(nbeta1, 0.999))
+
+ log_rec_loss = 0
+
+
+ for iteration in tqdm(range(current_iteration, total_iterations+1)):
+ real_image, noise_idx = next(dataloader)
+ real_image = real_image.to(device)
+
+ optimizerG.zero_grad()
+
+ select_noise = fixed_noise[noise_idx]
+ g_image = netG(select_noise)[0]
+
+ rec_loss = percept( F.avg_pool2d( g_image, 2, 2), F.avg_pool2d(real_image,2,2) ).sum() + 0.2*F.mse_loss(g_image, real_image)
+
+ rec_loss.backward()
+
+ optimizerG.step()
+
+ log_rec_loss += rec_loss.item()
+
+ if iteration % 100 == 0:
+ print("lpips loss g: %.5f"%(log_rec_loss/100))
+ log_rec_loss = 0
+
+ if iteration % (save_interval*10) == 0:
+
+ with torch.no_grad():
+ vutils.save_image( torch.cat([
+ real_image, g_image]).add(1).mul(0.5), saved_image_folder+'/rec_%d.jpg'%iteration , nrow=batch_size)
+
+ interpolate(fixed_noise[0], fixed_noise[1], netG, saved_image_folder+'/interpolate_0_1_%d.jpg'%iteration)
+
+ if iteration % (save_interval*10) == 0 or iteration == total_iterations:
+ torch.save(fixed_noise, saved_model_folder+'/%d.pth'%iteration)
+
+ dataloader = DataLoader(dataset, batch_size=batch_size, shuffle=False, num_workers=dataloader_workers, pin_memory=True)
+
+ mean_lpips = 0
+ for idx, data in enumerate(dataloader):
+ real_image, noise_idx = data
+ real_image = real_image.to(device)
+
+ select_noise = fixed_noise[noise_idx]
+ g_image = netG(select_noise)[0]
+
+ rec_loss = percept( F.avg_pool2d( g_image, 2, 2), F.avg_pool2d(real_image,2,2) ).sum()
+ mean_lpips += rec_loss.sum()
+ mean_lpips /= len(dataset)
+ print(mean_lpips)
+
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(description='region gan')
+
+ parser.add_argument('--path', type=str, default='../lmdbs/art_landscape_1k', help='path of resource dataset, should be a folder that has one or many sub image folders inside')
+ parser.add_argument('--cuda', type=int, default=0, help='index of gpu to use')
+ parser.add_argument('--name', type=str, default='test1', help='experiment name')
+ parser.add_argument('--iter', type=int, default=50000, help='number of iterations')
+ parser.add_argument('--start_iter', type=int, default=0, help='the iteration to start training')
+ parser.add_argument('--batch_size', type=int, default=4, help='mini batch number of images')
+ parser.add_argument('--im_size', type=int, default=1024, help='image resolution')
+ parser.add_argument('--ckpt', type=str, default='None', help='checkpoint weight path')
+
+
+ args = parser.parse_args()
+ print(args)
+
+ train(args)
\ No newline at end of file
diff --git a/scripts/train_backtracking_one.py b/scripts/train_backtracking_one.py
new file mode 100644
index 0000000000000000000000000000000000000000..08c50aa825d0060516a631b8e71892f72cbee2ab
--- /dev/null
+++ b/scripts/train_backtracking_one.py
@@ -0,0 +1,159 @@
+import torch
+from torch import nn
+import torch.optim as optim
+import torch.nn.functional as F
+from torch.utils.data.dataloader import DataLoader
+from torchvision import transforms
+from torchvision import utils as vutils
+
+import argparse
+from tqdm import tqdm
+
+from models import weights_init, Discriminator, Generator, SimpleDecoder
+from operation import copy_G_params, load_params, get_dir
+from operation import ImageFolder, InfiniteSamplerWrapper
+from diffaug import DiffAugment
+policy = 'color,translation'
+import lpips
+percept = lpips.PerceptualLoss(model='net-lin', net='vgg', use_gpu=True)
+
+
+#torch.backends.cudnn.benchmark = True
+
+
+def crop_image_by_part(image, part):
+ hw = image.shape[2]//2
+ if part==0:
+ return image[:,:,:hw,:hw]
+ if part==1:
+ return image[:,:,:hw,hw:]
+ if part==2:
+ return image[:,:,hw:,:hw]
+ if part==3:
+ return image[:,:,hw:,hw:]
+
+def train_d(net, data, label="real"):
+ """Train function of discriminator"""
+ if label=="real":
+ #pred, [rec_all, rec_small, rec_part], part = net(data, label)
+ pred = net(data, label)
+ err = F.relu( torch.rand_like(pred) * 0.2 + 0.8 - pred).mean() #+ \
+ #percept( rec_all, F.interpolate(data, rec_all.shape[2]) ).sum() +\
+ #percept( rec_small, F.interpolate(data, rec_small.shape[2]) ).sum() +\
+ #percept( rec_part, F.interpolate(crop_image_by_part(data, part), rec_part.shape[2]) ).sum()
+ err.backward()
+ return pred.mean().item()#, rec_all, rec_small, rec_part
+ else:
+ pred = net(data, label)
+ err = F.relu( torch.rand_like(pred) * 0.2 + 0.8 + pred).mean()
+ err.backward()
+ return pred.mean().item()
+
+@torch.no_grad()
+def interpolate(z1, z2, netG, img_name, step=8):
+ z = [ a*z2 + (1-a)*z1 for a in torch.linspace(0, 1, steps=step) ]
+ z = torch.cat(z).view(step, -1)
+ g_image = netG(z)[0]
+ vutils.save_image( g_image.add(1).mul(0.5), img_name , nrow=step)
+
+
+def train(args):
+
+ data_root = args.path
+ total_iterations = args.iter
+ checkpoint = args.ckpt
+ batch_size = args.batch_size
+ im_size = args.im_size
+ ndf = 64
+ ngf = 64
+ nz = 256
+ nlr = 0.0002
+ nbeta1 = 0.5
+ use_cuda = True
+ multi_gpu = False
+ dataloader_workers = 8
+ current_iteration = 0
+ save_interval = 100
+ saved_model_folder, saved_image_folder = get_dir(args)
+
+ device = torch.device("cpu")
+ if use_cuda:
+ device = torch.device("cuda:0")
+
+ transform_list = [
+ transforms.Resize((int(im_size),int(im_size))),
+ transforms.RandomHorizontalFlip(),
+ transforms.ToTensor(),
+ transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])
+ ]
+ trans = transforms.Compose(transform_list)
+
+ dataset = ImageFolder(root=data_root, transform=trans)
+ dataloader = iter(DataLoader(dataset, batch_size=batch_size, shuffle=False,
+ sampler=InfiniteSamplerWrapper(dataset), num_workers=dataloader_workers, pin_memory=True))
+
+
+
+ netG = Generator(ngf=ngf, nz=nz, im_size=im_size)
+
+
+ ckpt = torch.load(checkpoint)
+ load_params( netG , ckpt['g_ema'] )
+ #netG.eval()
+ netG.to(device)
+
+ fixed_noise = torch.randn(batch_size, nz, requires_grad=True, device=device)
+ optimizerG = optim.Adam([fixed_noise], lr=0.1, betas=(nbeta1, 0.999))
+
+ real_image = next(dataloader).to(device)
+
+ log_rec_loss = 0
+
+ for iteration in tqdm(range(current_iteration, total_iterations+1)):
+
+ optimizerG.zero_grad()
+
+ g_image = netG(fixed_noise)[0]
+
+ rec_loss = percept( F.avg_pool2d( g_image, 2, 2), F.avg_pool2d(real_image,2,2) ).sum() + 0.2*F.mse_loss(g_image, real_image)
+
+ rec_loss.backward()
+
+ optimizerG.step()
+
+ log_rec_loss += rec_loss.item()
+
+ if iteration % 100 == 0:
+ print("lpips loss g: %.5f"%(log_rec_loss/100))
+ log_rec_loss = 0
+
+ if iteration % (save_interval*2) == 0:
+
+ with torch.no_grad():
+ vutils.save_image( torch.cat([
+ real_image, g_image]).add(1).mul(0.5), saved_image_folder+'/rec_%d.jpg'%iteration )
+
+ interpolate(fixed_noise[0], fixed_noise[1], netG, saved_image_folder+'/interpolate_0_1_%d.jpg'%iteration)
+
+ if iteration % (save_interval*5) == 0 or iteration == total_iterations:
+ torch.save(fixed_noise, saved_model_folder+'/%d.pth'%iteration)
+
+
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(description='region gan')
+
+ parser.add_argument('--path', type=str, default='../lmdbs/art_landscape_1k', help='path of resource dataset, should be a folder that has one or many sub image folders inside')
+ parser.add_argument('--cuda', type=int, default=0, help='index of gpu to use')
+ parser.add_argument('--name', type=str, default='test1', help='experiment name')
+ parser.add_argument('--iter', type=int, default=50000, help='number of iterations')
+ parser.add_argument('--start_iter', type=int, default=0, help='the iteration to start training')
+ parser.add_argument('--batch_size', type=int, default=8, help='mini batch number of images')
+ parser.add_argument('--im_size', type=int, default=1024, help='image resolution')
+ parser.add_argument('--ckpt', type=str, default='None', help='checkpoint weight path')
+
+
+ args = parser.parse_args()
+ print(args)
+
+ train(args)
\ No newline at end of file
diff --git a/train.py b/train.py
new file mode 100644
index 0000000000000000000000000000000000000000..6d7ad18d2a1751fd27d805177b2819043bc94d6d
--- /dev/null
+++ b/train.py
@@ -0,0 +1,205 @@
+import torch
+from torch import nn
+import torch.optim as optim
+import torch.nn.functional as F
+from torch.utils.data.dataloader import DataLoader
+from torchvision import transforms
+from torchvision import utils as vutils
+
+import argparse
+import random
+from tqdm import tqdm
+
+from models import weights_init, Discriminator, Generator
+from operation import copy_G_params, load_params, get_dir
+from operation import ImageFolder, InfiniteSamplerWrapper
+from diffaug import DiffAugment
+policy = 'color,translation'
+import lpips
+percept = lpips.PerceptualLoss(model='net-lin', net='vgg', use_gpu=True)
+
+
+#torch.backends.cudnn.benchmark = True
+
+def crop_image_by_part(image, part):
+ hw = image.shape[2]//2
+ if part==0:
+ return image[:,:,:hw,:hw]
+ if part==1:
+ return image[:,:,:hw,hw:]
+ if part==2:
+ return image[:,:,hw:,:hw]
+ if part==3:
+ return image[:,:,hw:,hw:]
+
+def train_d(net, data, label="real"):
+ """Train function of discriminator"""
+ if label=="real":
+ part = random.randint(0, 3)
+ pred, [rec_all, rec_small, rec_part] = net(data, label, part=part)
+ err = F.relu( torch.rand_like(pred) * 0.2 + 0.8 - pred).mean() + \
+ percept( rec_all, F.interpolate(data, rec_all.shape[2]) ).sum() +\
+ percept( rec_small, F.interpolate(data, rec_small.shape[2]) ).sum() +\
+ percept( rec_part, F.interpolate(crop_image_by_part(data, part), rec_part.shape[2]) ).sum()
+ err.backward()
+ return pred.mean().item(), rec_all, rec_small, rec_part
+ else:
+ pred = net(data, label)
+ err = F.relu( torch.rand_like(pred) * 0.2 + 0.8 + pred).mean()
+ err.backward()
+ return pred.mean().item()
+
+
+def train(args):
+
+ data_root = args.path
+ total_iterations = args.iter
+ checkpoint = args.ckpt
+ batch_size = args.batch_size
+ im_size = args.im_size
+ ndf = 64
+ ngf = 64
+ nz = 256
+ nlr = 0.0002
+ nbeta1 = 0.5
+ use_cuda = True
+ multi_gpu = True
+ dataloader_workers = args.workers
+ current_iteration = args.start_iter
+ save_interval = args.save_interval
+ saved_model_folder, saved_image_folder = get_dir(args)
+
+
+ device = torch.device("cpu")
+ if use_cuda:
+ device = torch.device("cuda:0")
+
+ transform_list = [
+ transforms.Resize((int(im_size),int(im_size))),
+ transforms.RandomHorizontalFlip(),
+ transforms.ToTensor(),
+ transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])
+ ]
+ trans = transforms.Compose(transform_list)
+
+ if 'lmdb' in data_root:
+ from operation import MultiResolutionDataset
+ dataset = MultiResolutionDataset(data_root, trans, 1024)
+ else:
+ dataset = ImageFolder(root=data_root, transform=trans)
+
+
+ dataloader = iter(DataLoader(dataset, batch_size=batch_size, shuffle=False,
+ sampler=InfiniteSamplerWrapper(dataset), num_workers=dataloader_workers, pin_memory=True))
+ '''
+ loader = MultiEpochsDataLoader(dataset, batch_size=batch_size,
+ shuffle=True, num_workers=dataloader_workers,
+ pin_memory=True)
+ dataloader = CudaDataLoader(loader, 'cuda')
+ '''
+
+
+ #from model_s import Generator, Discriminator
+ netG = Generator(ngf=ngf, nz=nz, im_size=im_size)
+ netG.apply(weights_init)
+
+ netD = Discriminator(ndf=ndf, im_size=im_size)
+ netD.apply(weights_init)
+
+ netG.to(device)
+ netD.to(device)
+
+ avg_param_G = copy_G_params(netG)
+
+ fixed_noise = torch.FloatTensor(8, nz).normal_(0, 1).to(device)
+
+ optimizerG = optim.Adam(netG.parameters(), lr=nlr, betas=(nbeta1, 0.999))
+ optimizerD = optim.Adam(netD.parameters(), lr=nlr, betas=(nbeta1, 0.999))
+
+ if checkpoint != 'None':
+ ckpt = torch.load(checkpoint)
+ netG.load_state_dict({k.replace('module.', ''): v for k, v in ckpt['g'].items()})
+ netD.load_state_dict({k.replace('module.', ''): v for k, v in ckpt['d'].items()})
+ avg_param_G = ckpt['g_ema']
+ optimizerG.load_state_dict(ckpt['opt_g'])
+ optimizerD.load_state_dict(ckpt['opt_d'])
+ current_iteration = int(checkpoint.split('_')[-1].split('.')[0])
+ del ckpt
+
+ if multi_gpu:
+ netG = nn.DataParallel(netG.to(device))
+ netD = nn.DataParallel(netD.to(device))
+
+ for iteration in tqdm(range(current_iteration, total_iterations+1)):
+ real_image = next(dataloader)
+ real_image = real_image.to(device)
+ current_batch_size = real_image.size(0)
+ noise = torch.Tensor(current_batch_size, nz).normal_(0, 1).to(device)
+
+ fake_images = netG(noise)
+
+ real_image = DiffAugment(real_image, policy=policy)
+ fake_images = [DiffAugment(fake, policy=policy) for fake in fake_images]
+
+ ## 2. train Discriminator
+ netD.zero_grad()
+
+ err_dr, rec_img_all, rec_img_small, rec_img_part = train_d(netD, real_image, label="real")
+ train_d(netD, [fi.detach() for fi in fake_images], label="fake")
+ optimizerD.step()
+
+ ## 3. train Generator
+ netG.zero_grad()
+ pred_g = netD(fake_images, "fake")
+ err_g = -pred_g.mean()
+
+ err_g.backward()
+ optimizerG.step()
+
+ for p, avg_p in zip(netG.parameters(), avg_param_G):
+ avg_p.mul_(0.999).add_(0.001 * p.data)
+
+ if iteration % 100 == 0:
+ print("GAN: loss d: %.5f loss g: %.5f"%(err_dr, -err_g.item()))
+
+ if iteration % (save_interval*10) == 0:
+ backup_para = copy_G_params(netG)
+ load_params(netG, avg_param_G)
+ with torch.no_grad():
+ vutils.save_image(netG(fixed_noise)[0].add(1).mul(0.5), saved_image_folder+'/%d.jpg'%iteration, nrow=4)
+ vutils.save_image( torch.cat([
+ F.interpolate(real_image, 128),
+ rec_img_all, rec_img_small,
+ rec_img_part]).add(1).mul(0.5), saved_image_folder+'/rec_%d.jpg'%iteration )
+ load_params(netG, backup_para)
+
+ if iteration % (save_interval*50) == 0 or iteration == total_iterations:
+ backup_para = copy_G_params(netG)
+ load_params(netG, avg_param_G)
+ torch.save({'g':netG.state_dict(),'d':netD.state_dict()}, saved_model_folder+'/%d.pth'%iteration)
+ load_params(netG, backup_para)
+ torch.save({'g':netG.state_dict(),
+ 'd':netD.state_dict(),
+ 'g_ema': avg_param_G,
+ 'opt_g': optimizerG.state_dict(),
+ 'opt_d': optimizerD.state_dict()}, saved_model_folder+'/all_%d.pth'%iteration)
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(description='region gan')
+
+ parser.add_argument('--path', type=str, default='../lmdbs/art_landscape_1k', help='path of resource dataset, should be a folder that has one or many sub image folders inside')
+ parser.add_argument('--output_path', type=str, default='./', help='Output path for the train results')
+ parser.add_argument('--cuda', type=int, default=0, help='index of gpu to use')
+ parser.add_argument('--name', type=str, default='test1', help='experiment name')
+ parser.add_argument('--iter', type=int, default=50000, help='number of iterations')
+ parser.add_argument('--start_iter', type=int, default=0, help='the iteration to start training')
+ parser.add_argument('--batch_size', type=int, default=8, help='mini batch number of images')
+ parser.add_argument('--im_size', type=int, default=1024, help='image resolution')
+ parser.add_argument('--ckpt', type=str, default='None', help='checkpoint weight path if have one')
+ parser.add_argument('--workers', type=int, default=2, help='number of workers for dataloader')
+ parser.add_argument('--save_interval', type=int, default=100, help='number of iterations to save model')
+
+ args = parser.parse_args()
+ print(args)
+
+ train(args)