diff --git a/PaxKawaiina202402/PaxKawaiina.py b/PaxKawaiina202402/PaxKawaiina.py new file mode 100644 index 0000000..0b87c7c --- /dev/null +++ b/PaxKawaiina202402/PaxKawaiina.py @@ -0,0 +1,148 @@ +# ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢀⢀⠠⡠⠠⡠⡰⣒⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢌⢂⠢⡡⢑⠡⠪⡹⢮⢲⢱⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡔⡡⢘⠨⡂⢆⠢⡀⡯⣮⡪⢂⠕⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢐⢇⠧⣑⢄⠐⠈⠪⢢⡫⡟⠌⡂⡂⠢⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡸⡱⡡⢳⠠⠠⠀⡀⠕⢍⠀⠀⢐⠨⢐⢐⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠌⢎⡂⠀⠉⣂⡕⠅⠕⠅⢁⠀⠐⡨⢐⢐⠨⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠅⠅⢅⠢⠀⢕⢗⢎⢎⠌⢀⠀⠠⠀⢂⢂⠢⠨⡈⠄⠀⠀⠀⠀⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⢡⢑⢐⢅⢐⠡⡃⡂⡑⡌⠄⠂⠂⠀⠐⡐⡡⢁⠢⠐⡀⠀⠀⠀⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⢨⢪⢢⡣⠧⢑⢼⡐⡅⢎⢾⢜⢶⠅⠀⠀⢱⢐⠡⠨⢐⠀⠄⠀⠀⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⡇⣗⢵⢙⠈⣔⠅⡏⡪⠘⠨⣻⢮⡂⠀⠀⠨⡪⡊⠌⡀⠂⠀⠄⠀⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣜⢮⡺⣜⡀⡢⡳⡅⢌⢆⠁⠀⡯⣗⡇⠀⠀⠀⢹⡪⡀⠄⠂⠀⠀⠄⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⠠⡸⡪⢣⢙⠜⡰⡹⢸⢪⠡⠪⡄⠀⣯⣳⢣⠀⠀⠀⠐⡝⡆⡂⢂⠈⢀⠠⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠠⢱⡁⠆⣇⢕⢕⢜⠮⡨⠂⢕⣕⢌⠢⣗⢗⢽⡀⠀⠀⠀⢣⡳⡨⢐⠨⠀⠄⠐⡀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠠⣑⢵⢕⡼⣾⣺⢾⣗⢅⠕⡱⠘⡜⣌⡮⣯⡇⡎⣇⠀⠀⠀⠨⣪⠢⡂⢊⠌⢂⠡⠐⠀⠀ +# ⠀⠀⠀⠀⠀⠠⣑⡾⣝⡆⢟⢼⡺⡯⡯⣳⡐⣄⡧⡯⡗⡫⣷⣳⠱⡽⡀⠀⠀⠀⡣⡣⠊⠄⢌⠐⠌⠌⡂⠀ +# ⠀⠀⠀⠀⡠⠡⡢⡻⡮⡏⡢⢇⢋⠯⠯⡪⢏⠳⡽⠰⢈⢸⣗⣗⢕⢝⣆⠀⠀⠀⢪⢪⠨⠨⠠⠡⠡⠡⠨⡀ +# ⠀⠀⠀⡐⠄⢅⣗⢥⢪⣂⠄⡂⠄⠩⡈⠀⠁⠃⠅⢃⢢⠻⣺⡪⣎⢮⠳⠀⠀⠀⢂⠇⢌⠌⠌⠌⠌⠌⡂⡂ +# ⠀⠀⡐⡐⢡⡳⣕⢧⡣⣯⣻⢺⣪⠢⠂⠀⠀⠘⡽⡽⣕⢧⠀⠂⠂⠁⠀⠀⠀⠀⢐⠅⠅⠌⠌⠌⠌⡂⡂⡂ +# ⠀⢐⢐⢈⢲⢝⢮⡳⣕⣗⣗⢗⡗⢅⠀⠀⠀⠀⢹⣝⢮⣳⡀⠀⠀⠀⠀⠀⠀⠀⡐⠌⢜⠨⡊⠌⡂⡂⠢⠨ +# ⠀⢂⢂⠢⢣⢫⡳⣝⢮⣞⣮⡳⡝⠄⠀⠀⠀⠀⠐⡽⣕⡷⡅⠀⠀⠀⠀⠀⠀⠀⢌⢜⢜⢜⢌⢂⠢⠨⠨⠨ +# ⠈⠄⡂⢌⠪⡪⡪⡮⡳⣗⣗⢯⡇⡅⠀⠀⠀⠀⠀⢸⣗⢯⢯⠀⠀⠀⠀⠀⠀⠨⡐⡼⣕⢕⢕⠔⡡⠡⢁⠡ +# ⠄⠁⡂⠢⡑⢌⢺⡪⣏⡷⣝⢗⡗⡕⠀⠀⠀⠀⠀⠈⡮⣏⢯⡂⠀⠀⠀⠀⠀⡪⢰⢣⡣⡣⡣⡊⠄⠂⠀⠀ +# ⡂⡐⠌⡂⡊⠔⡵⡹⣜⣟⣮⡳⡑⠩⡀⠀⠀⠀⠀⠀⠹⣮⡳⣇⠀⠀⠀⠀⡨⡪⡪⡪⡪⡪⡪⢌⢪⠠⠁⠀ +# ⢂⠔⠡⡂⡪⢨⢪⢪⣺⣟⡮⡇⠀⠀⠂⡀⠀⠀⠀⠀⠀⠳⣯⣻⣆⠀⠀⢀⣗⢝⣜⢮⡪⣪⢪⡪⡂⠇⠁⠀ +# ⠐⡨⢸⢌⢆⢕⢕⣕⡯⣗⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣾⢽⣆⠀⠐⡕⢕⢕⢧⡫⡮⡳⡑⠁⠀⠀⠀ +# ⠀⠨⢪⢳⡱⡵⣕⠗⣯⣗⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣽⣺⠄⠀⠨⠈⢇⠧⡳⡹⠈⠀⠀⠀⠀⠀ +# ⠀⠀⠈⠑⢝⢜⢘⠀⡷⣯⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣞⣗⠀⠀⠈⠀⠅⠃⠀⠀⠀⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠁⠂⠁⡯⣗⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢺⣝⠆⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⣯⠳⡅⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡪⢯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⢮⡫⡪⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢇⢇⢗⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⠹⡎⠗⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢕⢕⠳⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +# Thy Pax Kawaiina come + +import json +import numpy as np +import tensorflow as tf +from PIL import Image +import PIL +from tensorflow.keras.preprocessing.image import img_to_array +import os +import re +import shutil +import pyexiv2 + +def isImg(item): + pattern = re.compile('.+\.(jpg|png|jfif|jpeg|JPG|PNG|webp)') + if pattern.match(item): + return True + else: + return False + +def isKawaii(file): + #画像を配列に変換 + try: + imgPIL = Image.open(file) + imgPIL = imgPIL.convert('RGB') + imgPIL = imgPIL.resize((input_width, input_height)) + x = img_to_array(imgPIL) / 255 #正規化 + x = x[None, ...] + + # 推論 + predict = infer(tf.constant(x)) + label = classes['Label'] + varr = predict['Confidences'][0].numpy() + value = label[np.argmax(varr)] #"Not2D"か "KawaiiPictures"がはいる + + if value == "KawaiiPictures": + return True + else: + return False + except PIL.UnidentifiedImageError: + return False + except PIL.Image.DecompressionBombError: + return False + except OSError: + return False + +def isPhoto(file): + try: + with pyexiv2.Image(file) as imgExif: + device = imgExif.read_exif()['Exif.Image.Model'] + print(device) + return True + except KeyError: + return False + except RuntimeError: + return True + except UnicodeDecodeError: + return False + +def moveTo(oldpath,dirName): + os.makedirs(dirName, exist_ok=True) + #同名のファイルが既にあったときのファイル名変更措置 + k = 1 + fileName0 = os.path.basename(oldpath) + while True: + if not os.path.isfile(os.path.join(dirName, fileName0)): + shutil.move(oldpath, os.path.join(dirName, fileName0)) + break + else: + fileName0 = os.path.splitext(fileName0)[0] + "_" + str(k) + os.path.splitext(fileName)[1] + k += 1 + +def moveToOld(file,dirName): + os.makedirs(dirName, exist_ok=True) + shutil.move(file, dirName) + +def moveImg(file): + loc = os.path.dirname(file) + if isImg(file): + if isKawaii(file) and not isPhoto(file): + moveTo(file,loc+"/nijis") + + if isPhoto(file): + try: + moveTo(file,loc+"/photos") + except FileNotFoundError: + print("oh...") + else: + if isKawaii(file): + moveTo(file,loc+"/nijis") + else: + moveTo(file,loc+"/nonijis") + + + else: + moveTo(file,loc+"/zanyo") + +def eachpax(dir): + files = [os.path.join(dir,file) for file in os.listdir(dir) if os.path.isfile(os.path.join(dir,file))] + for file in files: + moveImg(file) + +if __name__ == "__main__": + + + # signature読込 + with open('./signature.json', 'r') as f: + signature = json.load(f) + inputs = signature.get('inputs') + classes = signature.get('classes') + input_width, input_height = inputs['Image']['shape'][1:3] # モデルの学習画像サイズを取得 + + # model読込 + model = tf.saved_model.load('') #ここで時刻がプリントされる + infer = model.signatures['serving_default'] + + eachpax('../') diff --git a/PaxKawaiina202402/PaxKawaiinaStop.bat b/PaxKawaiina202402/PaxKawaiinaStop.bat new file mode 100644 index 0000000..6c18e00 --- /dev/null +++ b/PaxKawaiina202402/PaxKawaiinaStop.bat @@ -0,0 +1,3 @@ +call %userprofile%\anaconda3\Scripts\activate.bat font +python PaxKawaiina.py +cmd /k \ No newline at end of file diff --git a/photo_kawaii_image/README.md b/PaxKawaiina202402/README.md similarity index 100% rename from photo_kawaii_image/README.md rename to PaxKawaiina202402/README.md diff --git a/photo_kawaii_image/saved_model.pb b/PaxKawaiina202402/saved_model.pb similarity index 100% rename from photo_kawaii_image/saved_model.pb rename to PaxKawaiina202402/saved_model.pb diff --git a/photo_kawaii_image/signature.json b/PaxKawaiina202402/signature.json similarity index 100% rename from photo_kawaii_image/signature.json rename to PaxKawaiina202402/signature.json diff --git a/photo_kawaii_image/variables/variables.data-00000-of-00001 b/PaxKawaiina202402/variables/variables.data-00000-of-00001 similarity index 100% rename from photo_kawaii_image/variables/variables.data-00000-of-00001 rename to PaxKawaiina202402/variables/variables.data-00000-of-00001 diff --git a/photo_kawaii_image/variables/variables.index b/PaxKawaiina202402/variables/variables.index similarity index 100% rename from photo_kawaii_image/variables/variables.index rename to PaxKawaiina202402/variables/variables.index diff --git a/BokeOrNotBoke/PaxKawaiina.bat b/oldversions/BokeOrNotBoke/PaxKawaiina.bat similarity index 100% rename from BokeOrNotBoke/PaxKawaiina.bat rename to oldversions/BokeOrNotBoke/PaxKawaiina.bat diff --git a/BokeOrNotBoke/PaxKawaiina.py b/oldversions/BokeOrNotBoke/PaxKawaiina.py similarity index 100% rename from BokeOrNotBoke/PaxKawaiina.py rename to oldversions/BokeOrNotBoke/PaxKawaiina.py diff --git a/BokeOrNotBoke/labels.txt b/oldversions/BokeOrNotBoke/labels.txt similarity index 100% rename from BokeOrNotBoke/labels.txt rename to oldversions/BokeOrNotBoke/labels.txt diff --git a/BokeOrNotBoke/saved_model.pb b/oldversions/BokeOrNotBoke/saved_model.pb similarity index 100% rename from BokeOrNotBoke/saved_model.pb rename to oldversions/BokeOrNotBoke/saved_model.pb diff --git a/BokeOrNotBoke/signature.json b/oldversions/BokeOrNotBoke/signature.json similarity index 100% rename from BokeOrNotBoke/signature.json rename to oldversions/BokeOrNotBoke/signature.json diff --git a/BokeOrNotBoke/variables/variables.data-00000-of-00001 b/oldversions/BokeOrNotBoke/variables/variables.data-00000-of-00001 similarity index 100% rename from BokeOrNotBoke/variables/variables.data-00000-of-00001 rename to oldversions/BokeOrNotBoke/variables/variables.data-00000-of-00001 diff --git a/BokeOrNotBoke/variables/variables.index b/oldversions/BokeOrNotBoke/variables/variables.index similarity index 100% rename from BokeOrNotBoke/variables/variables.index rename to oldversions/BokeOrNotBoke/variables/variables.index diff --git a/MikuOrNotMiku/PaxKawaiina.bat b/oldversions/MikuOrNotMiku/PaxKawaiina.bat similarity index 100% rename from MikuOrNotMiku/PaxKawaiina.bat rename to oldversions/MikuOrNotMiku/PaxKawaiina.bat diff --git a/MikuOrNotMiku/PaxKawaiina.py b/oldversions/MikuOrNotMiku/PaxKawaiina.py similarity index 100% rename from MikuOrNotMiku/PaxKawaiina.py rename to oldversions/MikuOrNotMiku/PaxKawaiina.py diff --git a/MikuOrNotMiku/saved_model.pb b/oldversions/MikuOrNotMiku/saved_model.pb similarity index 100% rename from MikuOrNotMiku/saved_model.pb rename to oldversions/MikuOrNotMiku/saved_model.pb diff --git a/MikuOrNotMiku/signature.json b/oldversions/MikuOrNotMiku/signature.json similarity index 100% rename from MikuOrNotMiku/signature.json rename to oldversions/MikuOrNotMiku/signature.json diff --git a/MikuOrNotMiku/variables/variables.data-00000-of-00001 b/oldversions/MikuOrNotMiku/variables/variables.data-00000-of-00001 similarity index 100% rename from MikuOrNotMiku/variables/variables.data-00000-of-00001 rename to oldversions/MikuOrNotMiku/variables/variables.data-00000-of-00001 diff --git a/MikuOrNotMiku/variables/variables.index b/oldversions/MikuOrNotMiku/variables/variables.index similarity index 100% rename from MikuOrNotMiku/variables/variables.index rename to oldversions/MikuOrNotMiku/variables/variables.index diff --git a/MikuOrNotMiku2/PaxKawaiina.bat b/oldversions/MikuOrNotMiku2/PaxKawaiina.bat similarity index 100% rename from MikuOrNotMiku2/PaxKawaiina.bat rename to oldversions/MikuOrNotMiku2/PaxKawaiina.bat diff --git a/MikuOrNotMiku2/PaxKawaiina.py b/oldversions/MikuOrNotMiku2/PaxKawaiina.py similarity index 100% rename from MikuOrNotMiku2/PaxKawaiina.py rename to oldversions/MikuOrNotMiku2/PaxKawaiina.py diff --git a/MikuOrNotMiku2/labels.txt b/oldversions/MikuOrNotMiku2/labels.txt similarity index 100% rename from MikuOrNotMiku2/labels.txt rename to oldversions/MikuOrNotMiku2/labels.txt diff --git a/MikuOrNotMiku2/saved_model.pb b/oldversions/MikuOrNotMiku2/saved_model.pb similarity index 100% rename from MikuOrNotMiku2/saved_model.pb rename to oldversions/MikuOrNotMiku2/saved_model.pb diff --git a/MikuOrNotMiku2/signature.json b/oldversions/MikuOrNotMiku2/signature.json similarity index 100% rename from MikuOrNotMiku2/signature.json rename to oldversions/MikuOrNotMiku2/signature.json diff --git a/MikuOrNotMiku2/variables/variables.data-00000-of-00001 b/oldversions/MikuOrNotMiku2/variables/variables.data-00000-of-00001 similarity index 100% rename from MikuOrNotMiku2/variables/variables.data-00000-of-00001 rename to oldversions/MikuOrNotMiku2/variables/variables.data-00000-of-00001 diff --git a/MikuOrNotMiku2/variables/variables.index b/oldversions/MikuOrNotMiku2/variables/variables.index similarity index 100% rename from MikuOrNotMiku2/variables/variables.index rename to oldversions/MikuOrNotMiku2/variables/variables.index diff --git a/PaxKawaiina.bat b/oldversions/PaxKawaiina.bat similarity index 100% rename from PaxKawaiina.bat rename to oldversions/PaxKawaiina.bat diff --git a/PaxKawaiina.py b/oldversions/PaxKawaiina.py similarity index 100% rename from PaxKawaiina.py rename to oldversions/PaxKawaiina.py diff --git a/pax4/PaxKawaiina.py b/oldversions/pax4/PaxKawaiina.py similarity index 100% rename from pax4/PaxKawaiina.py rename to oldversions/pax4/PaxKawaiina.py diff --git a/photo_kawaii_image/PaxKawaiina.bat b/oldversions/photo_kawaii_image/PaxKawaiina.bat similarity index 100% rename from photo_kawaii_image/PaxKawaiina.bat rename to oldversions/photo_kawaii_image/PaxKawaiina.bat diff --git a/photo_kawaii_image/PaxKawaiina.py b/oldversions/photo_kawaii_image/PaxKawaiina.py similarity index 100% rename from photo_kawaii_image/PaxKawaiina.py rename to oldversions/photo_kawaii_image/PaxKawaiina.py diff --git a/photo_kawaii_image/PaxKawaiinaStop.bat b/oldversions/photo_kawaii_image/PaxKawaiinaStop.bat similarity index 100% rename from photo_kawaii_image/PaxKawaiinaStop.bat rename to oldversions/photo_kawaii_image/PaxKawaiinaStop.bat diff --git a/photo_kawaii_image1/README.md b/oldversions/photo_kawaii_image/README.md similarity index 100% rename from photo_kawaii_image1/README.md rename to oldversions/photo_kawaii_image/README.md diff --git a/photo_kawaii_image1/saved_model.pb b/oldversions/photo_kawaii_image/saved_model.pb similarity index 100% rename from photo_kawaii_image1/saved_model.pb rename to oldversions/photo_kawaii_image/saved_model.pb diff --git a/photo_kawaii_image1/signature.json b/oldversions/photo_kawaii_image/signature.json similarity index 100% rename from photo_kawaii_image1/signature.json rename to oldversions/photo_kawaii_image/signature.json diff --git a/photo_kawaii_image1/variables/variables.data-00000-of-00001 b/oldversions/photo_kawaii_image/variables/variables.data-00000-of-00001 similarity index 100% rename from photo_kawaii_image1/variables/variables.data-00000-of-00001 rename to oldversions/photo_kawaii_image/variables/variables.data-00000-of-00001 diff --git a/photo_kawaii_image1/variables/variables.index b/oldversions/photo_kawaii_image/variables/variables.index similarity index 100% rename from photo_kawaii_image1/variables/variables.index rename to oldversions/photo_kawaii_image/variables/variables.index diff --git a/photo_kawaii_image1/PaxKawaiina.bat b/oldversions/photo_kawaii_image1/PaxKawaiina.bat similarity index 100% rename from photo_kawaii_image1/PaxKawaiina.bat rename to oldversions/photo_kawaii_image1/PaxKawaiina.bat diff --git a/photo_kawaii_image1/PaxKawaiina.py b/oldversions/photo_kawaii_image1/PaxKawaiina.py similarity index 91% rename from photo_kawaii_image1/PaxKawaiina.py rename to oldversions/photo_kawaii_image1/PaxKawaiina.py index 55fa6e7..8f95756 100644 --- a/photo_kawaii_image1/PaxKawaiina.py +++ b/oldversions/photo_kawaii_image1/PaxKawaiina.py @@ -88,10 +88,23 @@ def isPhoto(file): return True except UnicodeDecodeError: return False + +def moveTo(oldpath,dirName): + os.makedirs(dirName, exist_ok=True) + #同名のファイルが既にあったときのファイル名変更措置 + k = 1 + fileName0 = os.path.basename(oldpath) + while True: + if not os.path.isfile(os.path.join(dirName, fileName0)): + shutil.move(oldpath, os.path.join(dirName, fileName0)) + break + else: + fileName0 = os.path.splitext(fileName)[0] + "_" + str(k) + os.path.splitext(fileName)[1] + k += 1 -def moveTo(file,dirname): - os.makedirs(dirname, exist_ok=True) - shutil.move(file, dirname) +def moveToOld(file,dirName): + os.makedirs(dirName, exist_ok=True) + shutil.move(file, dirName) def moveImg(file): loc = os.path.dirname(file) diff --git a/photo_kawaii_image1/PaxKawaiinaStop.bat b/oldversions/photo_kawaii_image1/PaxKawaiinaStop.bat similarity index 100% rename from photo_kawaii_image1/PaxKawaiinaStop.bat rename to oldversions/photo_kawaii_image1/PaxKawaiinaStop.bat diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/README.md" b/oldversions/photo_kawaii_image1/README.md similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/README.md" rename to oldversions/photo_kawaii_image1/README.md diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/saved_model.pb" b/oldversions/photo_kawaii_image1/saved_model.pb similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/saved_model.pb" rename to oldversions/photo_kawaii_image1/saved_model.pb diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/signature.json" b/oldversions/photo_kawaii_image1/signature.json similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/signature.json" rename to oldversions/photo_kawaii_image1/signature.json diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/variables/variables.data-00000-of-00001" b/oldversions/photo_kawaii_image1/variables/variables.data-00000-of-00001 similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/variables/variables.data-00000-of-00001" rename to oldversions/photo_kawaii_image1/variables/variables.data-00000-of-00001 diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/variables/variables.index" b/oldversions/photo_kawaii_image1/variables/variables.index similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/variables/variables.index" rename to oldversions/photo_kawaii_image1/variables/variables.index diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/PaxKawaiina.bat" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/PaxKawaiina.bat" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/PaxKawaiina.bat" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/PaxKawaiina.bat" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/PaxKawaiina.py" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/PaxKawaiina.py" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/PaxKawaiina.py" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/PaxKawaiina.py" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/README.md" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/README.md" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/README.md" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/README.md" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/saved_model.pb" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/saved_model.pb" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/saved_model.pb" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/saved_model.pb" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/signature.json" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/signature.json" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/signature.json" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/signature.json" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/variables/variables.data-00000-of-00001" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/variables/variables.data-00000-of-00001" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/variables/variables.data-00000-of-00001" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/variables/variables.data-00000-of-00001" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/variables/variables.index" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/variables/variables.index" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/variables/variables.index" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\212/variables/variables.index" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/PaxKawaiina.bat" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/PaxKawaiina.bat" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/PaxKawaiina.bat" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/PaxKawaiina.bat" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/PaxKawaiina.py" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/PaxKawaiina.py" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/PaxKawaiina.py" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/PaxKawaiina.py" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/PaxKawaiinaStop.bat" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/PaxKawaiinaStop.bat" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/PaxKawaiinaStop.bat" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/PaxKawaiinaStop.bat" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/README.md" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/README.md" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/README.md" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/README.md" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/saved_model.pb" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/saved_model.pb" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/saved_model.pb" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/saved_model.pb" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/signature.json" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/signature.json" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/signature.json" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/signature.json" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/variables/variables.data-00000-of-00001" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/variables/variables.data-00000-of-00001" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/variables/variables.data-00000-of-00001" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/variables/variables.data-00000-of-00001" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/variables/variables.index" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/variables/variables.index" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/variables/variables.index" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2122/variables/variables.index" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/PaxKawaiina.bat" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/PaxKawaiina.bat" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/PaxKawaiina.bat" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/PaxKawaiina.bat" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/PaxKawaiina.py" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/PaxKawaiina.py" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/PaxKawaiina.py" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/PaxKawaiina.py" diff --git "a/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/PaxKawaiinaStop.bat" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/PaxKawaiinaStop.bat" similarity index 100% rename from "\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/PaxKawaiinaStop.bat" rename to "oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/PaxKawaiinaStop.bat" diff --git "a/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/README.md" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/README.md" new file mode 100644 index 0000000..a277755 --- /dev/null +++ "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/README.md" @@ -0,0 +1,17 @@ +① +anacondaをダウンロードしインストールする +microsoft lobeをダウンロードしインストールする + +② +anaconda promptを起動し conda create -n lober2と入力しエンターキーを押す。するとlober2という名前の仮想環境が作られる +anaconda promptで、conda activate lober2と入力しエンターキーを押す。するとlober2が有効化される。成功するとlober2>という表示になる +anaconda promptでconda install tensorflowと入力しエンターキーを押す。lober2>という表示が出るまで待つ。しばらくすると機械学習ライブラリtensorflowがインストールされる。 +anaconda promptでconda install pillowと入力しエンターキーを押す。lober2>という表示が出るまで待つ。しばらくすると画像処理ライブラリpillowがインストールされる。 + +③ +lobeで画像分類モデルを作り、exportメニューからtensorflow設定でエクスポートする +エクスポートしたモデルが入っているフォルダに、PaxKawaiina.batとPaxKawaiina.pyをコピペする +エクスポートしたモデルが入っているフォルダを、分類したい画像があるフォルダにコピペする +PaxKawaiina.batをダブルクリックする + +うまくいくと、画像のコピーがフォルダ分けされている。対応していないファイルは「sonota」というフォルダに入れられている。フォルダ分けされるのはファイルのみで、フォルダは無視される。 \ No newline at end of file diff --git "a/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/saved_model.pb" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/saved_model.pb" new file mode 100644 index 0000000..7edec71 Binary files /dev/null and "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/saved_model.pb" differ diff --git "a/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/signature.json" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/signature.json" new file mode 100644 index 0000000..278cf31 --- /dev/null +++ "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/signature.json" @@ -0,0 +1 @@ +{"doc_id": "9a00fd7d-78a0-425f-a394-f51eb7b975c1", "doc_name": "Pry2", "doc_version": "caf93b2bab10ae7a7af569bf1703cc9d", "format": "tf", "version": 32, "inputs": {"Image": {"dtype": "float32", "shape": [null, 224, 224, 3], "name": "Image:0"}}, "outputs": {"Confidences": {"dtype": "float32", "shape": [null, 2], "name": "sequential/dense_2/Softmax:0"}}, "tags": ["serve"], "classes": {"Label": ["Not2D", "KawaiiPictures"]}, "filename": "saved_model.pb", "export_model_version": 1} \ No newline at end of file diff --git "a/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/variables/variables.data-00000-of-00001" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/variables/variables.data-00000-of-00001" new file mode 100644 index 0000000..d0320a7 Binary files /dev/null and "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/variables/variables.data-00000-of-00001" differ diff --git "a/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/variables/variables.index" "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/variables/variables.index" new file mode 100644 index 0000000..b05d5c3 Binary files /dev/null and "b/oldversions/\343\203\221\343\202\257\343\202\271\343\203\273\343\202\253\343\203\257\343\202\244\343\203\274\343\203\2123/variables/variables.index" differ diff --git "a/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/PaxKawaiina.bat" "b/oldversions/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/PaxKawaiina.bat" similarity index 100% rename from "\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/PaxKawaiina.bat" rename to "oldversions/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/PaxKawaiina.bat" diff --git "a/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/PaxKawaiina.py" "b/oldversions/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/PaxKawaiina.py" similarity index 100% rename from "\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/PaxKawaiina.py" rename to "oldversions/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/PaxKawaiina.py" diff --git "a/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/labels.txt" "b/oldversions/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/labels.txt" similarity index 100% rename from "\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/labels.txt" rename to "oldversions/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/labels.txt" diff --git "a/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/saved_model.pb" "b/oldversions/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/saved_model.pb" similarity index 100% rename from "\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/saved_model.pb" rename to "oldversions/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/saved_model.pb" diff --git "a/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/signature.json" "b/oldversions/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/signature.json" similarity index 100% rename from "\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/signature.json" rename to "oldversions/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/signature.json" diff --git "a/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/variables/variables.data-00000-of-00001" "b/oldversions/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/variables/variables.data-00000-of-00001" similarity index 100% rename from "\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/variables/variables.data-00000-of-00001" rename to "oldversions/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/variables/variables.data-00000-of-00001" diff --git "a/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/variables/variables.index" "b/oldversions/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/variables/variables.index" similarity index 100% rename from "\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/variables/variables.index" rename to "oldversions/\351\235\236\344\272\214\346\254\241\347\265\265\345\210\206\351\241\236\347\224\2501/variables/variables.index"