Upgrade to Pro — share decks privately, control downloads, hide ads and more …

続・絵を読む技術 Pythonで読むイラストの心理戦略 / The Art of Readi...

Hirosaji
October 15, 2022

続・絵を読む技術 Pythonで読むイラストの心理戦略 / The Art of Reading Illustrations 2nd

PyCon JP 2022 (2022/10/15) @Hirosaji @Hirosaji_ez
https://2022.pycon.jp/timetable?id=JWM39L

=====
Title (English): The Art of Reading Illustrations 2nd: Psychological Strategies for Illustration read in Python

Hirosaji

October 15, 2022
Tweet

More Decks by Hirosaji

Other Decks in Technology

Transcript

  1. લճ͸ɺΠϥετͷઓུΛ̎ͭʹେผͯ͠ղઆɻͦͷதͰʮͳʹΛ఻͑Δ͔ʯ͸ߏ੒ཁૉͷ঺հʹཹ·ͬͨɻ લ ճ · Ͱ ͷ ͋ Β ͢ ͡

    ͥ Μ ͔ ͍ ֆࢣͷૂ͍ Ͳ͜Λ఻͑Δ͔ ͳʹΛ఻͑Δ͔ γΣΠϓ ϥΠϯ ৭ Πϥετͷ৺ཧઓུͷҐஔ෇͚ ޫʢ໌౓ʣ ΩϟϥΫλʔ ʜ ߏਤͷࠎ૊ΈΛߏ੒ ʜ ഑৭όϥϯεΛ౷੍ ʜ ʜ য఺ͷҹ৅Λ੍ޚ ײ৘໘Λࢧ഑ Τ Ϟ Έ ʜ ʢະղઆʣ ࡁ
  2. ࠓճ͸ͦΜͳΠϥετͷߏ੒ཁૉͷதͰ΋ɺ৺ཧʹಇ̏ͭ͘ͷཁૉΛऔΓ্͛ͯਂ۷Γ͢Δɻ લ ճ · Ͱ ͷ ͋ Β ͢ ͡

    ͥ Μ ͔ ͍ ֆࢣͷૂ͍ Ͳ͜Λ఻͑Δ͔ ͳʹΛ఻͑Δ͔ γΣΠϓ ϥΠϯ ৭ ޫʢ໌౓ʣ ΩϟϥΫλʔ ৺ཧʹޮ͘ ̏ཁૉ ࠓճͷ ਂ۷Γର৅ 🔎 Πϥετͷ৺ཧઓུͷҐஔ෇͚ ࡁ
  3. ఆੴͷҰͭ͸ɺίϯτϥϙετɻلݩલɺݹ୅ΪϦγΞ࣌୅ͷூࠁͰൃ໌͞Εɺࠓ΋ड͚ܧ͕ΕΔɻ ΩϟϥΫλʔͷັྗΛҾ͖ग़͢ఆੴᶃɿίϯτϥϙετ ίϯτϥϙετͱ͸ +PIO4JOHFS4BSHFOU r cQVCMJDEPNBJO 4BOESP#PUUJDFMMJ r cQVCMJDEPNBJO 5IFCJSUIPG7FOVT

    .BEBNF9 .JDIFMBOHFMP r c$$#:4" %BWJE ίϯτϥϙετ͸ɺ ମॏͷଟ͕͘ย٭ʹ͔͔ͬͨ࢟੎ͷ͜ͱɻ ༂ಈײΛੜΉ࢟੎ͱͯ͠لݩલ̐ੈلࠒʹൃ໌ɻ ݱ୅ʹ΋޿͘ड͚ܧ͕Ε͍ͯΔɻ lιοΧͷඒज़ղ๤ֶϊʔτιΫδϣϯώϣϯcΦʔϜࣾʢʣlଞΑΓ
  4. ·ͣ%ը૾͔Β%ͷΩʔϙΠϯτਪఆΛ͢Δɻਪఆ͸ɺ405"ͷख๏ʢ.F53"CTʣʹͯ4.1-Λ׆༻ɻ ίϯτϥϙετΛݕग़͢Δ  ʢ5'ʹͯ%࢟੎ਪఆϞσϧ 4.1- Λར༻ʣ # import library import

    tensorflow as tf # load model model = tf.saved_model.load(download_model('metrabs_mob3l_y4t')) # load input image image = tf.image.decode_jpeg(tf.io.read_file(img_name)) pred = model.detect_poses(image, skeleton='smpl_24') # visualize by MeTRAbs demo method visualize( image.numpy(), pred['boxes'].numpy(), pred['poses3d'].numpy(), pred['poses2d'].numpy(), model.per_skeleton_joint_edges['smpl_24'].numpy()) ࢟੎ਪఆ͸શ਎ֆͷΈ༗ޮɻ ΩϟϥΫλʔͷັྗΛҾ͖ग़͢ఆੴᶃɿίϯτϥϙετ ಥඈͳϙʔζ͸ɺ ͏·࢟͘੎ਪఆͰ͖ͳ͍
  5. ਪఆͨ͠ΩʔϙΠϯτͷ࠲ඪಉ࢜ͷ૬ରతͳҐஔؔ܎Λܭࢉ͠ɺݞͱࠊͷࠨӈͷߴ͕͞ޓ͍ҧ͍͔൑ผɻ ίϯτϥϙετΛݕग़͢Δ  ʢ5'ʹͯ%࢟੎ਪఆϞσϧ 4.1- Λར༻ʣ # adjusting the visualize

    method def visualize(…): ... # detect contrast per estimated humans # using coordinate transformation is_contra = detect_contra(pred['poses3d'].numpy()[i]) ... # visualize by MeTRAbs demo method visualize( image.numpy(), pred['boxes'].numpy(), pred['poses3d'].numpy(), pred['poses2d'].numpy(), model.per_skeleton_joint_edges['smpl_24'].numpy()) ࠲Ґͷίϯτϥϙετ΋ਪఆՄɻ ݕग़ͨ͠ίϯτϥϙετΛɺ ੺࿮ͷCCPYͰғΉɻ ΩϟϥΫλʔͷັྗΛҾ͖ग़͢ఆੴᶃɿίϯτϥϙετ
  6. ·ͣ͸உੑ͕޷Ήঁੑͷಛ௃ɻஉੑ͸ɺ׬શʹݟͨ໨͚ͩͰए݈͘߁Ͱ͋Δ͜ͱ͕൑ผͰ͖Δಛ௃Λ޷Ήɻ lਐԽ৺ཧֶ͔Βߟ͑ΔϗϞαϐΤϯεҰສ೥มԽ͠ͳ͍Ձ஋؍Ξϥϯɾ4ɾϛϥʔcύϯϩʔϦϯάגࣜձࣾʢʣlΑΓ ݟͨ໨ͰΘ͔Δಛ௃ ͘ͼΕͨࡉ͍΢ΤετɺԒͷ͋Δ௕͍൅ɺ ๛ຬͰϋϦͷ͋Δόετɺؙ͘ઑֺͬͨɺ γϫͷͳ͍៉ྷͳटݩɺ෯ͷ޿͍ࠎ൫ɺ ϋϦͷ͋Δ៉ྷͳखɺ೑෇͖ͷྑ͍٭FUD ˠ ए݈͘߁Ͱ ൟ৩Ձ͕ߴ͍

    உঁͷੑઓུʹجͮ͘޷·ΕΔಛ௃<உੑˠҟੑ> உੑ͸جຊతʹൟ৩Ձ͕ߴ͍ʢ೛৷͕੒ޭ͠΍͍͢ʣঁੑΛ޷Ήɻ ೛৷͸ɺ݈߁Ͱए͍ঁੑ΄Ͳ੒ޭ཰্͕͕ΔͷͰɺݟͨ໨ͷ݈߁͞ͱए͕͞γάφϧɻ ΩϟϥΫλʔͷັྗΛҾ͖ग़͢ఆੴᶄɿੑઓུ ঁੑΩϟϥʹඳ͔ΕΔϑΣνͷଟ͕͘ʮए͞ʯͱʮ݈߁ʯͷσϑΥϧϝ FUD Ԓͷ͋Δ௕͍൅ ๛ຬͰϋϦͷ͋Δόετ ؙ͘ઑֺͬͨ ͘ͼΕͨࡉ͍΢Τετ ෯ͷ޿͍ࠎ൫ γϫͷͳ͍៉ྷͳख ೑෇͖ͷྑ͍٭ γϫͷͳ͍៉ྷͳटݩ ੒ख़͠ɺ࿝͚͍ͯͳ͍ ੒ख़͠ɺ͔ͭ҆࢈͕ݟࠐΊΔ ੒ख़͠ɺ࿝͚͍ͯͳ͍ ੒ख़͠ɺ݈߁తͰ͋Δ පؾͰͳ͘ɺ೛৷͍ͯ͠ͳ͍ ੒ख़͠ɺਨΕΔ೥ྸͰ͸ͳ͍ ൅Λ৳͹͢ظؒɺ݈߁Ͱए͍ ೕࣃ͕ແ͍೥ྸͰɺଠͬͯͳ͍
  7. ࠷ޙʹɺࢠڙʹରͯ͠ɻஉঁͱ΋ʹϕϏʔεΩʔϚΛ࣋ͭ΋ͷʹ͸ɺਓͰ΋ಈ෺Ͱ΋ѪΒ͘͠ײ͡Δɻ l%JFBOHFCPSFOFO'PSNFONÖHMJDIFS&SGBISVOH-PSFO[ ,c;FJUTDISJGU'ÛS5JFSQTZDIPMPHJFʢʣlΑΓ ݟͨ໨ͰΘ͔Δಛ௃ ϕϏʔεΩʔϚ <େ͖ͳ໨ɺ๲ΒΜͩ๹ɺؙ͍͓Ͱ͜ɺ େ͖ͳ಄ɺ஄ྗ͋Δഽɺ୹͍ख଍FUD> ˠ อޢͨ͘͠ͳΔ ༊͞ΕΔ

    உঁͷੑઓུʹجͮ͘޷·ΕΔಛ௃<உঁˠࢠڙ> ࢠڙʹରͯ͠͸உঁͱ΋ʹɺ ʮϕϏʔεΩʔϚʯͰఆٛ͞ΕΔࢠڙΒ͍͠਎ମతಛ௃ΛѪΒ͘͠ࢥ͏ɻ ΩϟϥΫλʔͷັྗΛҾ͖ग़͢ఆੴᶄɿੑઓུ ࢠڙͷ਎ମతಛ௃͸ɺ࣮೥ྸ΋छ଒΋࣍ݩ΋ؔ܎ͳ͘ѪΒ͍͠
  8. ਺ߦͰݕग़͢Δྫɻ/4'8'JMUFS͸4/4΍ݕࡧͳͲͷࣄྫ͕ଟ͘ɺ044΋ଟ͍ɻϑϦʔϥΠυ͠΍͍͢ɻ ࿐ࠎͳදݱΛݕग़͢Δʢ/VEFOFUͷֶशࡁΈϞσϧʗ൑ผثΛར༻ʣ # import library import nudenet as NudeDetector #

    load input image and put local (omitted) # initialize detector (adjusted NudeDetector in nudenet) detector = NudeDetector() # run censor method # -> detect nudity & set bbox & display image detector.censor(img_name) ݕग़࣌ʹ ܯࠂʁ ΩϟϥΫλʔͷັྗΛҾ͖ग़͢ఆੴᶄɿੑઓུ
  9. લ൒·ͱΊɻΩϟϥΫλʔͷັྗΛදݱ͢Δࣗ༝౓͕ߴ͍͜ͱΛ౿·͑ͯɺશਓྨʹ༗ޮͳఆੴΛࣔͨ͠ɻ ΩϟϥΫλʔͷ৺ཧઓུɿ·ͱΊ ϙʔζ ද৘ Ͳ͏ັྗΛ఻͑Δ͔ ίϯτϥϙετ ఆੴ ੑઓུ ʜ ΩϟϥΫλʔੑͱ

    ೑ମඒ ʜ உ͸ൟ৩ɺ ঁ͸Ϧιʔε ಛ௃ᶃ ಛ௃ᶇ ಛ௃ᶄ ಛ௃ᶆ ಛ௃ᶅ ϙʔζʗද৘ΛܾΊΔ ΩϟϥΫλʔͷັྗΛ఻͑Δ ετʔϦʔ΍৔໘Λ఻͑Δ Ωϟϥֆͷझࢫ
  10. ίϯτϥϙετ ఆੴ ੑઓུ ʜ ΩϟϥΫλʔੑͱ ೑ମඒ ʜ உ͸ൟ৩ɺ ঁ͸Ϧιʔε ಛ௃ᶃ

    ಛ௃ᶇ ಛ௃ᶄ ಛ௃ᶆ ಛ௃ᶅ ϙʔζʗද৘ΛܾΊΔ ʁʁʁ ʁʁʁ ϙʔζ ද৘ Ͳ͏ັྗΛ఻͑Δ͔ ΩϟϥΫλʔͷັྗΛ఻͑Δ ετʔϦʔ΍৔໘Λ఻͑Δ Ωϟϥֆͷझࢫ ࠓճ঺հͨ͠ఆੴ͸σϞͰࣔͨ͠௨Γɺ1ZUIPO΍"*Ͱ΋ཧղ͠΍͍͢ɻֆࢣ͕஫ྗ͢΂͖͸ଞͷཁૉ͔΋ɻ ΩϟϥΫλʔͷ৺ཧઓུɿΫϦΤΠλʔ͕஫ྗ͢΂͖͸…ʁ
  11. # crone Deep_White_Balance !git clone https://github.com/mahmoudnafifi/Deep_White_Balance.git # run test script

    !python demo_single_image.py \ —input INPUT_IMAGE_PATH \ --output_dir OUTPUT_DIR \ --model_dir MODEL_DIR # crone mixedillWB !git clone https://github.com/mahmoudnafifi/mixedillWB.git # run test script !python test.py \ --wb-settings T F D C S \ --model-name WB_model_p_64_D_S_T_F_C \ —testing-dir INPUT_DIR --outdir OUTPUT_DIR ϗϫΠτόϥϯεͷ่ΕΛิਖ਼͠ɺෳ਺ͷর໌ͷ৭Λิਖ਼͢Δͱ͍͏̎ͭͷख๏Λ࠾༻ʢ঎༻ར༻ෆՄʣ র໌ͷ৭Λݕग़ʗന͘ิਖ਼͢Δʢ%FFQ8# NJYFEJMM8#Λར༻6/FUʣ ("'"ࣾһΒͷެ։͢ΔSFQPͷ αϯϓϧεΫϦϓτΛ࣮ߦ͢Δ͚ͩɻ PythonͰΠϥετͷޫͷ৭Λ୳Δ
  12. # crone Deep_White_Balance !git clone https://github.com/mahmoudnafifi/Deep_White_Balance.git # run test script

    !python demo_single_image.py \ —input INPUT_IMAGE_PATH \ --output_dir OUTPUT_DIR \ --model_dir MODEL_DIR # crone mixedillWB !git clone https://github.com/mahmoudnafifi/mixedillWB.git # run test script !python test.py \ --wb-settings T F D C S \ --model-name WB_model_p_64_D_S_T_F_C \ —testing-dir INPUT_DIR --outdir OUTPUT_DIR ϗϫΠτόϥϯεͷ่ΕΛิਖ਼͠ɺෳ਺ͷর໌ͷ৭Λิਖ਼͢Δͱ͍͏̎ͭͷख๏Λ࠾༻ʢ঎༻ར༻ෆՄʣ র໌ͷ৭Λݕग़ʗന͘ิਖ਼͢Δʢ%FFQ8# NJYFEJMM8#Λར༻6/FUʣ ("'"ࣾһΒͷެ։͢ΔSFQPͷ αϯϓϧεΫϦϓτΛ࣮ߦ͢Δ͚ͩɻ PythonͰΠϥετͷޫͷ৭Λ୳Δ ࣮ࣸ% 👍 Πϥετ σϑΥϧϝऑΊ 👍 Πϥετ σϑΥϧϝڧΊ 🤔 ͨͩ͠σϑΥϧϝ͕ڧ͘ͳΔ΄Ͳɺ৭ͷิਖ਼͕͏·͍͔͘ͳ͘ͳΔɻ ڧ ऑ
  13. Πϥετͷޫͷදݱ͸ɺ෺ཧ๏ଇʹ४ڌ͸ͯ͠΋ɺ९क͸͞Εͳ͍ɻͦͷͨΊҰఆͷϧʔϧͷநग़͸ࠔ೉ɻ PythonͰΠϥετͷޫͷ৭Λ୳Δ → Failed 2ΠϥετͷϗϫΠτόϥϯεɺԿނ͏·͍͔͘ͳ͍ͷ͔ έʔε̍ɹཱମදݱ͕লུ έʔε̎ɹهԱ৭ʢయܕ৭ʣΛڧௐ "ɹཧ༝͸ʮޫͷ෺ཧ๏ଇʹैΘͳ͍࠼৭ʯ͔ͩΒ ˠ ҰఆͷϧʔϧԽ͸ࠔ೉

    লུ ڧௐ ʜ l৭࠼ݕఆެࣜςΩετڃฤ ೥վగ൛ ʗ6$ڃ ೥վగ൛ ৭࠼ݕఆڠձc৭࠼ݕఆڠձlଞΑΓ Πϥετσʔλͷ෼ੳͰ͸ ޫΛ௚઀ѻ͏ͷ͸೉͍͠ɺ৭ʹूத͢Δ 🥲 ઓུతఫୀ ͥ͟ΔΛಘͳ͍
  14. a ੍ ࡞ ϑ ϩ Πϥετશମͷ৭ΛܾΊΔ ඃࣸମʢʴഎܠʣΛඳ͖ࠐΉ ܾ·ͬͨ഑৭Λϕʔεʹ ண৭͠ɺࡉ෦Λඳ͖ࠐΉɻ ˠΫΦϦςΟΛ্͛Δ

    ˠίϯηϓτΛܾΊΔ ഑৭Ͱґཔऀͱͷ߹ҙ͕औΕͨΒɺΫΦϦςΟʔΛ্͛ΔͨΊʹΠϥετʹ৭Λඳ͖ࠐΜͰ͍͘ɻ ৭ͷ໾໨ͱ੍࡞ϑϩʔ
  15. a ੍ ࡞ ϑ ϩ ഑৭Ͱ ίϯηϓτܾఆ Πϥετશମͷ৭ΛܾΊΔ ˠίϯηϓτΛܾΊΔ ృΓͰ

    ΫΦϦςΟ61 ඃࣸମʢʴഎܠʣΛඳ͖ࠐΉ ˠΫΦϦςΟΛ্͛Δ ʜ⁞ ʜ  ͭ·Γɺ৭ʹ͸ʮ഑৭ͰίϯηϓτΛܾΊΔʯʮృΓͰΫΦϦςΟΛ্͛Δʯͱ͍͏̎ͭͷ໾໨͕͋Δɻ ৭ͷ໾໨ͱ੍࡞ϑϩʔ
  16. ⁞഑৭ͰίϯηϓτΛܾΊΔɿ఻͑Δҹ৅͕୯৭ or ෳ਺৭ l৭࠼ݕఆެࣜςΩετڃฤ ೥վగ൛ ʗ6$ڃ ೥վగ൛ ৭࠼ݕఆڠձc৭࠼ݕఆڠձlଞΑΓ Πϥετશମʹ࢖ΘΕΔ৭͸ྨࣅͯ͠Δʁ෼ࢄͯ͠Δʁ શମͷ৭͸ྨࣅ͔෼ࢄ͔

    ྨࣅ ྨࣅ৭ͷதͰ ࠷΋໘ੵͷଟ͍৭ͷ ҹ৅·ͨ͸࿈૝Πϝʔδ ֆࢣ͕఻͍͑ͨײ৘ ෼ࢄ ෼ࢄͨ͠഑৭ͷ ૊Έ߹ΘͤʹΑΔ ҹ৅·ͨ͸࿈૝Πϝʔδ ֆࢣ͕఻͍͑ͨײ৘ Ұͭ໨ɺ഑৭ͰͲΜͳίϯηϓτΛܾΊΔ͔ɻ఻͍͑ͨΠϝʔδʹ߹Θͤͯɺશମͷ৭Λྨࣅʗ෼ࢄͤ͞Δɻ
  17. ඃࣸମͱഎܠ͸ରൺ͔ಉԽ͔ ରൺ ಉԽ ඃࣸମͱഎܠͷ৭ͷ෼෍͕େ͖͘ҟͳΔʁࣅ͍ͯΔʁ ˠɹඃࣸମ͕࣋ͭײ৘ʹ஫໨͍ͤͨ͞ ˠɹΠϥετશମ͕࣋ͭײ৘ʹ஫໨͍ͤͨ͞ ⁞഑৭ͰίϯηϓτΛܾΊΔɿओ໾͕ඃࣸମ or શମ l৭࠼ݕఆެࣜςΩετڃฤ

    ೥վగ൛ ʗ6$ڃ ೥վగ൛ ৭࠼ݕఆڠձc৭࠼ݕఆڠձlଞΑΓ ͦͯ͠ඃࣸମʹ஫໨͍͔ͤͨ͞ɺഎܠʹೃછ·͍͔ͤͨɺͱ͍͏ૂ͍ʹ߹Θͤͯ৭ΛରൺʗಉԽͤ͞Δɻ
  18. ഑৭Λ၆ᛌ͢Δɿྨࣅ͔෼ࢄ͔  ʢશମ૾ΛϚϯηϧද৭ܥͰ೺Ѳʣ # import library from matplotlib.colors import ListedColormap

    import matplotlib.pyplot as plt # prepare dataset C = [[1032 1033 1034 ... 1072 1073 1074] [ 989 990 991 ... 1029 1030 1031] ... [ 43 44 45 ... 83 84 85] [ 0 1 2 ... 40 41 42]] masked_cc = ['#ba2237' ... ‘#ffffff', ‘#411434', '#ffffff'] cmap = ListedColormap(masked_cc) # draw pcolormesh ax = plt.pcolormesh(C, cmap=cmap) plt.colorbar(ax) ը૾ʹແ͍৭͸ ͰϚεΫ͢Δ #ffffff PythonͰΠϥετ͔Β৭ͷํ਑Λ୳Δ Ϛϯηϧද৭ܥͷσʔλΛ༻ҙͰ͖Ε͹ɺNBUQMPUMJCͷϝογϡඳըͰ഑৭ͷશମ૾͕ϚοϐϯάͰ͖Δɻ
  19. ഑৭Λ၆ᛌ͢Δɿྨࣅ͔෼ࢄ͔  ʢ৭૬෼෍Λ৭૬؀ώετάϥϜͰ೺Ѳʣ # import library import cv2 import matplotlib.pyplot

    as plt # prepare dataset (omitted) Polar_df = pd.DataFrame({'Hue': ..., 'Count': …}) # plot polar axis ax = plt.subplot(polar=True) # draw bars bars = ax.bar( x=[element * width for element in Polar_df.index], height=Polar_df.Count, width=2*np.pi / len(Polar_df.index), bottom=Polar_df[‘Count'].max()/3) ෼ࢄʁ ྨࣅʁ PythonͰΠϥετ͔Β৭ͷํ਑Λ୳Δ .BUQMPUMJCͷۃ࠲ඪάϥϑͰɺ৭૬؀Λ໛ͨ͠ώετάϥϜ΋දݱՄೳɻNBUQMPUMJC͸͍͍ͧɻ
  20. ഑৭Λ၆ᛌ͢Δɿྨࣅ͔෼ࢄ͔  ʢ৭૬෼෍Λ৭૬؀ώετάϥϜͰ೺Ѳʣ # import library import cv2 import matplotlib.pyplot

    as plt # prepare dataset (omitted) Polar_df = pd.DataFrame({'Hue': ..., 'Count': …}) # plot polar axis ax = plt.subplot(polar=True) # draw bars bars = ax.bar( x=[element * width for element in Polar_df.index], height=Polar_df.Count, width=2*np.pi / len(Polar_df.index), bottom=Polar_df[‘Count'].max()/3) ෼ࢄʁ ྨࣅʁ PythonͰΠϥετ͔Β৭ͷํ਑Λ୳Δ .BUQMPUMJCͷۃ࠲ඪάϥϑͰɺ৭૬؀Λ໛ͨ͠ώετάϥϜ΋දݱՄೳɻNBUQMPUMJC͸͍͍ͧɻ શମͷ৭ΛϚοϐϯάͯ͠ɺ഑৭ͷํ਑Λ໌Β͔ʹ͢Δʢ෼ࢄͷྫʣ ੺ ੺ ԫ ෼ੳྫɿ੺ͱԫʹ෼ࢄ͍ͯͯ͠Ҿཱ͖ͯ߹͍ɺܹࢗతͳҹ৅ɻ ෼ࢄʁ ྨࣅʁ
  21. ഑৭Λ၆ᛌ͢Δɿྨࣅ͔෼ࢄ͔  ʢ৭૬෼෍Λ৭૬؀ώετάϥϜͰ೺Ѳʣ # import library import cv2 import matplotlib.pyplot

    as plt # prepare dataset (omitted) Polar_df = pd.DataFrame({'Hue': ..., 'Count': …}) # plot polar axis ax = plt.subplot(polar=True) # draw bars bars = ax.bar( x=[element * width for element in Polar_df.index], height=Polar_df.Count, width=2*np.pi / len(Polar_df.index), bottom=Polar_df[‘Count'].max()/3) ෼ࢄʁ ྨࣅʁ PythonͰΠϥετ͔Β৭ͷํ਑Λ୳Δ .BUQMPUMJCͷۃ࠲ඪάϥϑͰɺ৭૬؀Λ໛ͨ͠ώετάϥϜ΋දݱՄೳɻNBUQMPUMJC͸͍͍ͧɻ શମͷ৭ΛϚοϐϯάͯ͠ɺ഑৭ͷํ਑Λ໌Β͔ʹ͢Δʢྨࣅͷྫʣ ෼ࢄʁ ྨࣅʁ ੨ʙ੺ ෼ੳྫɿࢵʹྨࣅ͢Δ৭Ͱ౷Ұ͞ΕɺϛεςϦΞεͳҹ৅ɻ
  22. ഑৭Λ၆ᛌ͢Δɿྨࣅ͔෼ࢄ͔  ʢ৭૬෼෍Λ৭૬؀ώετάϥϜͰ೺Ѳʣ # import library import cv2 import matplotlib.pyplot

    as plt # prepare dataset (omitted) Polar_df = pd.DataFrame({'Hue': ..., 'Count': …}) # plot polar axis ax = plt.subplot(polar=True) # draw bars bars = ax.bar( x=[element * width for element in Polar_df.index], height=Polar_df.Count, width=2*np.pi / len(Polar_df.index), bottom=Polar_df[‘Count'].max()/3) ෼ࢄʁ ྨࣅʁ PythonͰΠϥετ͔Β৭ͷํ਑Λ୳Δ .BUQMPUMJCͷۃ࠲ඪάϥϑͰɺ৭૬؀Λ໛ͨ͠ώετάϥϜ΋දݱՄೳɻNBUQMPUMJC͸͍͍ͧɻ ৭૬؀ώετάϥϜͰɺΑΓࡉ͔͍ύλʔϯʢ৭࠼ௐ࿨࿦ΑΓʣ͕୳ΕΔ ྨࣅ ྨࣅ ෼ࢄ ෼ࢄ ෼ࢄ ෼ࢄ l(VJEFUP$SFBUJOH$PMPS4DIFNFT"3530$,&5lΑΓ
  23. # import library import torch from carvekit.api.high import HiInterface #

    create CarveKit interface interface = HiInterface(batch_size_seg=5, batch_size_matting=1, device='cuda' if torch.cuda.is_available() else 'cpu', seg_mask_size=320, matting_mask_size=2048) images_without_background = interface([img_name]) # save object only image cat_wo_bg = images_without_background[0] cat_wo_bg.save(‘object_only.png') PythonͰΠϥετ͔Β৭ͷํ਑Λ୳Δ ඃࣸମͱഎܠͷؔ܎Λ୳Δɿରൺ͔ಉԽ͔ʢ$BSWF,JUͰ෼཭ʣ ඃࣸମͱഎܠͷ෼཭͸ɺڊਓͷݞʢ4FHNFOUBUJPOʣ͕୔ࢁɻࠓճ͸$BSWF,JUͱ͍͏'8Λར༻ͨ͠ɻ
  24. # import library import torch from carvekit.api.high import HiInterface #

    create CarveKit interface interface = HiInterface(batch_size_seg=5, batch_size_matting=1, device='cuda' if torch.cuda.is_available() else 'cpu', seg_mask_size=320, matting_mask_size=2048) images_without_background = interface([img_name]) # save object only image cat_wo_bg = images_without_background[0] cat_wo_bg.save(‘object_only.png') PythonͰΠϥετ͔Β৭ͷํ਑Λ୳Δ ඃࣸମͱഎܠͷؔ܎Λ୳Δɿରൺ͔ಉԽ͔ʢ$BSWF,JUͰ෼཭ʣ ඃࣸମͱഎܠͷ෼཭͸ɺڊਓͷݞʢ4FHNFOUBUJPOʣ͕୔ࢁɻࠓճ͸$BSWF,JUͱ͍͏'8Λར༻ͨ͠ɻ ඃࣸମͱഎܠΛ෼͚ͯ෼ੳ͠ɺؔ܎ੑΛ໌Β͔ʹ͢ΔʢಉԽͷྫʣ ରൺʁ ಉԽʁ ෼ੳྫɿΧϥϑϧͰ೐΍͔ͳҹ৅ɻඃࣸମͷ഑৭ʹ͍ۙԫ৭Λഎܠ͕ิ͍ಉԽ͍ͯ͠Δɻ
  25. # import library import torch from carvekit.api.high import HiInterface #

    create CarveKit interface interface = HiInterface(batch_size_seg=5, batch_size_matting=1, device='cuda' if torch.cuda.is_available() else 'cpu', seg_mask_size=320, matting_mask_size=2048) images_without_background = interface([img_name]) # save object only image cat_wo_bg = images_without_background[0] cat_wo_bg.save(‘object_only.png') PythonͰΠϥετ͔Β৭ͷํ਑Λ୳Δ ඃࣸମͱഎܠͷؔ܎Λ୳Δɿରൺ͔ಉԽ͔ʢ$BSWF,JUͰ෼཭ʣ ඃࣸମͱഎܠͷ෼཭͸ɺڊਓͷݞʢ4FHNFOUBUJPOʣ͕୔ࢁɻࠓճ͸$BSWF,JUͱ͍͏'8Λར༻ͨ͠ɻ ඃࣸମͱഎܠΛ෼͚ͯ෼ੳ͠ɺؔ܎ੑΛ໌Β͔ʹ͢Δʢରൺͷྫʣ ରൺʁ ಉԽʁ ෼ੳྫɿ੺ͱ྘ͷରൺɻάϨʔτʔϯͷ྘ͷ্Ͱ઱΍͔ͳ੺͕ࡍཱ͍ͬͯΔɻ
  26. # import library import torch from carvekit.api.high import HiInterface #

    create CarveKit interface interface = HiInterface(batch_size_seg=5, batch_size_matting=1, device='cuda' if torch.cuda.is_available() else 'cpu', seg_mask_size=320, matting_mask_size=2048) images_without_background = interface([img_name]) # save object only image cat_wo_bg = images_without_background[0] cat_wo_bg.save(‘object_only.png') PythonͰΠϥετ͔Β৭ͷํ਑Λ୳Δ ඃࣸମͱഎܠͷؔ܎Λ୳Δɿରൺ͔ಉԽ͔ʢ$BSWF,JUͰ෼཭ʣ ඃࣸମͱഎܠͷ෼཭͸ɺڊਓͷݞʢ4FHNFOUBUJPOʣ͕୔ࢁɻࠓճ͸$BSWF,JUͱ͍͏'8Λར༻ͨ͠ɻ ಉ༷ͷΞϓϩʔνͰɺΑΓৄࡉͳఆੑ෼ੳʹ௅Ήࣄྫ΋͋Γ·͢ lਓؾֆࢣͷ࡞඼͔ΒֶͿ഑৭ͷώϛπҴ༿ོcݰޫࣾʢʣlΑΓ Φεεϝʂ
  27. ྫ͑͹ಡΈࠐΜͩΠϥετΛ/෼ׂͯ͠ɺ֤ྖҬͷΤϯτϩϐʔΛܭࢉɻృΓͰ૿͑ͨ৘ใྔ͕ਪఆͰ͖Δɻ # import library (omitted) # load image (omitted) #

    divide gray scale image x0, y0, n, h, w = ... divided = [gray_image[x0*x:x0*(x+1), y0*y:y0*(y+1)] for x in range(n) for y in range(n)] # calculate entropy for each division entropies = [] for img in divided: img = np.array(img) e = calcEntropy_method(img) entropies.append(e) # visualize (omitted) ͋ʂ؈ͷඳ͖ࠐΈ͕ଟ͍ʂ ͳͲɺͩ͜ΘΓʹؾ෇͚Δ ඳ͖ࠐΈ͕ଟ͍ྖҬΛਪఆ͢ΔʢΤϯτϩϐʔͰܭࢉʣ PythonͰΠϥετ͔ΒృΓͷͩ͜ΘΓΛ୳Δ
  28. ޙ൒·ͱΊɻ৭ͷ໾໨Λ഑৭ͱృΓʹ෼͚ɺಛʹ഑৭ʹΑΔίϯηϓτͷಡΈํΛ࣮ફΛ௨ͯ͠ղઆͨ͠ɻ ޫͱ৭ͷ৺ཧઓུɿ·ͱΊ ৭ ഑৭Ͱίϯηϓτ શମͷ৭ ྨࣅ ෼ࢄ ରൺ ಉԽ ඃࣸମͱഎܠ

    ޫ ʜ ʜ ඳ͖ࠐΈྔʹͩ͜ΘΓ͕දΕΔ ʜ ৭୯ମͷΠϝʔδΛ׆༻ ʜ ʜ ʜ ৭ͷ૊Έ߹ΘͤΠϝʔδΛ׆༻ ඃࣸମΛ஫໨ͤ͞Δ Πϥετશମʹ໨Λ޲͚ͤ͞Δ ৭͸ޫʹґଘ͢Δʢͨͩ͠ɺޫΛΠϥετ͔Β෼཭͢Δͷ͸ࠔ೉ʣ ృΓͰΫΦϦςΟ
  29. ͜ͷதͰֆࢣ͕஫ྗ͢΂͖͸ɺ΍͸Γ఻͑ΔΠϝʔδΛܾΊΔίϯηϓτઃܭͳͷͰ͸ͳ͍͔ͱ૝૾͢Δɻ ޫͱ৭ͷ৺ཧઓུɿΫϦΤΠλʔ͕஫ྗ͢΂͖͸…ʁ ৭ ഑৭Ͱίϯηϓτ શମͷ৭ ྨࣅ ෼ࢄ ରൺ ಉԽ ඃࣸମͱഎܠ

    ޫ ʜ ʜ ඳ͖ࠐΈྔʹͩ͜ΘΓ͕දΕΔ ʜ ৭୯ମͷΠϝʔδΛ׆༻ ʜ ʜ ʜ ৭ͷ૊Έ߹ΘͤΠϝʔδΛ׆༻ ඃࣸମΛ஫໨ͤ͞Δ Πϥετશମʹ໨Λ޲͚ͤ͞Δ ৭͸ޫʹґଘ͢Δʢͨͩ͠ɺޫΛΠϥετ͔Β෼཭͢Δͷ͸ࠔ೉ʣ ృΓͰΫΦϦςΟ ˠࠓޙ͜͜͸"*ֆࢣʹ೚ͤΒΕΔ͔΋ʁ
  30. • ◦×ͰΘ͔Δ෩ܠ࡞ը ਆٕ࡞ըγϦʔζ - ͚͞ϋϥε | KADOKAWAʢ2020ʣ • ΩϟϥΫλʔΠϥετͷҾ͖ग़͠Λ૿΍͢ϙʔζͱද৘ͷԋग़ςΫχοΫ -

    ΧϦϚϦΧ | ᠳӭࣾʢ2022ʣ • ιοΧͷඒज़ղ๤ֶϊʔτ - ιΫδϣϯώϣϯ | ΦʔϜࣾʢ2018ʣ • ΩϜɾϥοΩͷਓମυϩʔΠϯά - ΩϜɾϥοΩ | ΦʔϜࣾʢ2020ʣ • ඳ͖͍ͨ΋ͷΛཧ࿦Ͱ͔ͭΉ ϙʔζͷఆཧ - ࣰ๪࿡࿠ | KADOKAWAʢ2022ʣ Ҏ্ɺ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ SFGFSFODF  Thank you! • Die angeborenen Formen möglicher Erfahrung - Lorenz, K. | Zeitschrift Für Tierpsychologieʢ1943ʣ • ਐԽ৺ཧֶ͔Βߟ͑ΔϗϞαϐΤϯε Ұສ೥มԽ͠ͳ͍Ձ஋؍ - ΞϥϯɾSɾϛϥʔ | ύϯϩʔϦϯάʢ2019ʣ
  31. • ৭ృΓνϡʔτϦΞϧ σδλϧ࠼৭ͷجຊ - ύΫɾϦϊ | Ϛʔϧࣾʢ2020ʣ • ޫͱ৭ͷνϡʔτϦΞϧ -

    ӄӨͱ৭࠼ΛࣗࡏʹૢΔʂ - ύΫɾϦϊ | Ϛʔϧࣾʢ2021ʣ • ৭࠼ݕఆ ެࣜςΩετ 1ڃฤ (2020೥վగ൛) - ৭࠼ݕఆڠձ | ৭࠼ݕఆڠձ • ৭࠼ݕఆ ެࣜςΩετ 3ڃฤ (2020೥վగ൛) - ৭࠼ݕఆڠձ | ৭࠼ݕఆڠձ • ৭࠼ݕఆ ެࣜςΩετ UCڃ (2022೥վగ൛) - ৭࠼ݕఆڠձ | ৭࠼ݕఆڠձ Ҏ্ɺ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ SFGFSFODF  Thank you! • Χϥʔ&ϥΠτ ϦΞϦζϜͷͨΊͷ৭࠼ͱޫͷඳ͖ํ - δΣʔϜεɾΨʔχʔ | Ϙʔϯσδλϧʢ2012ʣ • ৭࠼ݕఆ ެࣜςΩετ 2ڃฤ (2020೥վగ൛) - ৭࠼ݕఆڠձ | ৭࠼ݕఆڠձ
  32. • ਓؾֆࢣͷ࡞඼͔ΒֶͿ഑৭ͷώϛπ - Ҵ༿ོ | ݰޫࣾʢ2022ʣ • ΠϥετɺອըͷͨΊͷ഑৭ڭࣨ - দԬ৳࣏

    | MdNʢ2018ʣ • ഑৭ͷڭՊॻ - ৭࠼จԽݚڀձ | PIE Internationalʢ2018ʣ • The Art of GUWEIZ ά΢ΣΠζըू - GUWEIZ | ϗϏʔδϟύϯʢ2021ʣ • mignon͕͔ͬ͠Γڭ͑ΔʮഽృΓʯͷൿ݃ - mignon | SBΫϦΤΠςΟϒʢ2020ʣ Ҏ্ɺ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ SFGFSFODF  Thank you! • ཧܥ೴Ͱඳ͘๖͑ֆ - ݾଈੋۭʢ2017ʣ
  33. • Vision ετʔϦʔΛ఻͑Δɿ৭ɺޫɺߏਤ - ϋϯεɾPɾόοϋʔ | Ϙʔϯσδλϧʢ2019ʣ • ֆΛݟΔٕज़ ໊ըͷߏ଄ΛಡΈղ͘

    - ळాຑૣࢠ | ே೔ग़൛ࣾʢ2019ʣ • ޫͱ৭࠼ ղମ৽ॻ - μςφΦτ | ϚΠφϏग़൛ʢ2018ʣ • ըͮ͘ΓͷͨΊͷޫͷतۀ - দԬ৳࣏ | ϏʔɾΤψɾΤψ৽ࣾ ʢ2019ʣ • ײ֮৘ใͷ஌֮ϝΧχζϜ - ਗ਼ਫ๛ | ણҡ੡඼ফඅՊֶʢ1987ʣ Ҏ্ɺ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ SFGFSFODF  Thank you! • Novice Strategies for Understanding Paintings - JA SchmidtΒ | Applied Cognitive Psychology 3.1ʢ1989ʣ • ֆըؑ৆ʹ͓͚Δೝ஌త੍໿ͱͦͷ؇࿨ - ాத٢࢙, দຊ࠼ق | ೝ஌Պֶʢ2013ʣ
  34. • MeTRAbs Absolute 3D Human Pose Estimator | Github •

    ࠲ඪܥΛ͋ΘͤΔ ઈର࠲ඪͱϩʔΧϧ࠲ඪ - ϓϩάϥϛϯά੔ܗ֎Պҩͷϖʔδ • PythonʹΑΔ࠲ඪม׵ͷϓϩάϥϜ - ϓϩάϥϛϯά੔ܗ֎Պҩͷϖʔδ • ̏࣍ݩ্ۭؒͷͶ͡Εͨ̎௚ઢͷ࠷઀ۙ఺ΛٻΊΔ - Vignette & Clarity • Hue&ToneγεςϜ | Χϥʔઓུͷઐ໳Ո | NCD-WEB Ҏ্ɺ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ SFGFSFODF  Thank you! • Color Scheme Analysis of Illustrations - Niti Wattanasirichaigoon • Guide to Creating Color Schemes - ART ROCKET
  35. • Deep White-Balance Editing | Github • Auto White-Balance Correction

    for Mixed-Illuminant Scenes | Github • NudeNet | Github **NSFW** • CarveKit | Github • ʮΩϟϥֆඳ͖ΞϧΰϦζϜʯγϦʔζ - osakana.factory | ٕज़ॻయ Ҏ্ɺ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ SFGFSFODF  Thank you! • Munsell Resources - Paul Centore • Image Color Extraction with Python in 4 Steps - Boriharn K | Medium
  36. • σΟʔϓϒϦβʔυ - σΟʔϓϒϦβʔυ | YouTube • Yaki Mayuru drawing

    channel - ম·͍Δ | YouTube • ֆ༿·͠ΖͷͪΌΜͶΔ - ֆ༿·͠Ζ | Youtube Ҏ্ɺ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ SFGFSFODF  Thank you! • ͋ͳͨΛԠԉͨ͘͠ͳΔ5ͭͷཁҼͱ͸ʁ ਐԽ৺ཧֶͰߟ࡯ - Ṗ෦͑Ή | Noteʢ2018ʣ
 https://note.com/nasobem/n/n628306e0e6e5 • ϓϩ໺ٿϑΝϯʹؔ͢Δݚڀ(V) : ϑΝϯ৺ཧɺԠԉߦಈɺ͓Αͼूஂॴଐҙࣝͷߏ଄
 - ޿୔ढ़फΒ | ؔ੢ࠃࡍେֶ஍Ҭݚڀॴ૓ॻʢ2006ʣ • ʮ͔Θ͍͍ʯͷ৺ཧֶ - ೝ஌৺ཧੜཧֶݚڀࣨʢ2022/10/12࣌఺ʣ
  37. • ༷ʑͳݒ೦΍໰୊Λ๊͑ͭͭ΋ʮ͓ֆ͔͖AIʯͷਐԽ͸ࢭ·Βͣʢ2022/10/4ʣ| Yahoo!χϡʔε
 https://news.yahoo.co.jp/articles/1cb8c63ee8fb7a3bbbb8412aeefcc2bf2217d033 • ΠϥετϨʔλʔͷݸੑΛֶΜͰֆΛ“ແݶੜ੒”͢ΔAIαʔϏεʢ2022/8/29ʣ | ITmedia
 https://www.itmedia.co.jp/news/articles/2208/29/news133.html •

    AI͕ֆΛඳ͘ʁ ਐԽ͢Δը૾ੜ੒AIͷ࠷લઢʢ2022/10/8ʣ | NHK
 https://www3.nhk.or.jp/news/html/20221008/k10013851401000.html Ҏ্ɺ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ SFGFSFODF  Thank you! • ʮͱΜͰ΋ͳ͘ϋΠΫΦϦςΟʔʯ࿩୊ͷը૾AIʮNovel AIʯͰͻͨ͢Βೋ࣍ݩඒগঁͱඒগ೥Λੜ੒ͯ͠Έͨ | ITmedia
 https://www.itmedia.co.jp/news/articles/2208/29/news133.html • ʮӺ೫Έ͔ͪʯεέεέεΧʔτ͕େ෺ٞɹ౦ژϝτϩɺ൷൑ड͚ඍົʹʮमਖ਼ʯʢ2016/10/18ʣ | JCASTχϡʔε
 https://www.j-cast.com/2016/10/18280985.html