<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yasmine Maricar on Medium]]></title>
        <description><![CDATA[Stories by Yasmine Maricar on Medium]]></description>
        <link>https://medium.com/@ymaricar?source=rss-9693af168e5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8iXT1qBNYc0P_pjGUJyPcw.jpeg</url>
            <title>Stories by Yasmine Maricar on Medium</title>
            <link>https://medium.com/@ymaricar?source=rss-9693af168e5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 07:23:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ymaricar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Comment l’IA suralimente la créativité humaine ?]]></title>
            <link>https://ymaricar.medium.com/comment-lia-suralimente-la-cr%C3%A9ativit%C3%A9-humaine-16e71cdd6773?source=rss-9693af168e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/16e71cdd6773</guid>
            <category><![CDATA[midjourney]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[futur]]></category>
            <category><![CDATA[art]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Yasmine Maricar]]></dc:creator>
            <pubDate>Sat, 03 Dec 2022 23:20:24 GMT</pubDate>
            <atom:updated>2023-07-08T20:10:04.269Z</atom:updated>
            <content:encoded><![CDATA[<h3>Comment l’IA suralimente la créativité humaine ?</h3><p>Les générateurs d’images IA deviennent omniprésents et ont connu une augmentation significative au cours de l’été dernier avec la sortie de modèles open source dotés de capacités énormes telles que MidJourney.</p><p>Les avancées dans le domaine ont été époustouflantes et ce sujet m’intéresse beaucoup d’autant plus que je suis à la fois artiste et développeuse en Machine Learning (apprentissage automatique, science des données).</p><p>Aussi, j’ai voulu approfondir ces nouveaux outils et vous donner un aperçu et mes réflexions actuelles.</p><p>Cet article est une version étendue d’une courte conférence que j’ai donnée chez Microsoft lors d’une session de partage interne autour de divers sujets. Je fais partie de l’organisation des architectes cloud spécialisés en IA, où nous aidons chaque organisation à en faire plus avec les données et l’IA.</p><h3>Tout d’abord : une introduction aux générateurs d’images à partir de texte</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/0*KkG5k3DROWfhJDSZ" /><figcaption>Prompt : “le Petit Prince Saint Exupéry et son ami renard dans la forêt veillant sur un bouquet de fleurs” avec MidJourney” avec MidJourney</figcaption></figure><p>Cette image a été générée avec un tel outil, j’ai généré qu’en écrivant une invite de texte (qu’on appelle aussi “prompt”), ici c’était « le Petit Prince Saint Exupéry et son ami renard dans la forêt regardant quelques fleurs »</p><p>Bien sûr, dans ma tête, j’avais une certaine vision de ça, Le Petit Prince est un livre et je voulais une illustration avec les dits personnages.</p><p>Dans ce cas, cela semble être une très bonne œuvre d’art, assez abstraite quelque part, avec une sensation éthérée mais toujours assez bonne dans sa “réinterprétation”. C’est choquant à quel point on peut appeler cela “artistique”, cependant, voyons comment cela fonctionne dans les coulisses et ce qui a permis à cet outil de créer des œuvres d’art aussi “crédibles”.</p><p>La plupart des outils de génération d’images récents fonctionnent comme ça, ils prennent une invite de texte comme entrée, puis cela prend quelques secondes, jusqu’à 30 secondes je dirais, pour générer quelques images.</p><p>Sous le capot, ils travaillent principalement avec la dernière percée dans les modèles de texte en images : c’est ce qu’on appelle <strong>les modèles de diffusion</strong> .</p><p>La partie “texte guidé” fait référence au fait que le modèle apprend des associations entre des millions de paires de légendes et d’images associées. C’est ainsi qu’il peut apprendre à générer des images liées à une invite de texte spécifique.</p><p>Quant à la deuxième partie, qui est la diffusion, elle fait référence au fait que le modèle a, en quelque sorte, essayé de faire le processus inverse, en comprenant comment chaque goutte de peinture était déposée sur une œuvre.</p><p>Fondamentalement, il apprend en détruisant les données d’entraînement en y ajoutant du bruit, c’est donc la première étape de la figure ci-dessous :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/0*nu_0nyQvjzhJDamL" /></figure><p>Ensuite, il apprend à récupérer les données étape par étape en inversant le processus de bruit afin qu’il puisse simplement être illustré comme ça.</p><p>En fait, le modèle a appris de tout cela et produira des valeurs de pixel, étape par étape, jusqu’à la représentation complète d’une image.</p><p>Il n’utilise pas nécessairement les images en elles-mêmes, mais il a des millions à des milliards de variables qui sont utilisées chaque fois qu’il essaie de générer quelque chose de nouveau, il a donc juste besoin d’une invite de texte et il générera quelque chose à partir du bruit. Vous pouvez également ré-générer à partir de la même invite de texte et vous obtiendrez généralement des résultats différents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/0*ccFO6khEV9F2MzlF" /></figure><h3>Comparons différents outils de génération d’images</h3><h4>DALL-E par OpenAI</h4><p><a href="https://openai.com/dall-e-2/">DALL-E</a> d’Open AI (société privée) a été le premier à bénéficier d’une exposition critique grâce à ses capacités de conversion de texte en image, comment se compare-t-il à ces nouveaux venus open source ?</p><p>Le nom “DALL-E” est une combinaison de WALL-E (le film Pixar) et de Salvador Dalí, l’artiste.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/0*Zz32YDUIW2VGG0Tn" /></figure><p>Ici, j’ai généré des images représentant un astronaute dans une station balnéaire tropicale. Les images générées sont intéressantes et je voulais modifier l’astronaute pour qu’il s’agisse d’une astronaute typiquement féminine sirotant un cocktail (oui oui, dans l’espace).</p><p>Avec DALL-E, on peut modifier une partie d’une image en la mettant en surbrillance et en changeant l’invite de texte (=prompt), comme vous pouvez le voir ici, ce fut assez efficace.</p><p>On peut aussi partir d’une image et générer des variations à partir de celle-ci.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/0*P1HLedgDFvt-EUdk" /></figure><p>DALL-E est également fier de l’idéation de la conception de produits à l’image, j’ai juste mis ce que j’avais en tête en tant que produit sous forme d’invite de texte et ta-da!, j’ai obtenu des photos super réalistes! Impressionant!</p><h4>L’outil de MidJourney</h4><p>MidJourney propose un bot Discord avec lequel interagir pour générer des images et nous avons deux choix : upscaler une image ou générer d’autres variations à partir de celle-ci. Une invite de texte génère 4 images différentes dans une grille 2x2 :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*NvZ0V_wllb87WR7l" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/0*mGuQQJSfHxhDiXJz" /></figure><p>Ici, j’ai choisi de faire une série d’opérations pour observer les capacités de MidJourney en matière d’art conceptuel et d’illustration, car il est surtout connu pour cela. Cela m’a donné quelques options intéressantes même si cela ne suivait pas exactement mon invite comme je le voulais. ce processus d’itération et de réingénierie des mots que vous utilisez n’est pas différent du processus d’apprentissage à connaître un nouveau moteur de recherche et à “peaufiner” vos mots clés pour trouver le bon contenu, c’est maintenant presque un art, appelé “prompt engineering”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/0*l7Iao_CUtxeHrN2k" /></figure><p>Qui sait, peut-être aurons-nous des experts en prompt engineering à l’avenir 😮 Remarque : des personnes publient déjà des livres et du contenu liés à l’ingénierie par prompt et à l’utilisation d’outils d’IA pour la création artistique</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*9YMnlyDX3_nO9jtH" /></figure><p>J’ai essayé de générer des variations à partir des images générées en utilisant le bouton “v3” faisant référence à l’image en bas à gauche.</p><p>Midjourney n’était pas bon avec les visages cependant, il a évolué assez rapidement.</p><p>Vous pouvez également régénérer à partir de la même invite d’origine et obtenir des résultats différents.</p><p>Dans l’ensemble, ce n’était pas nécessairement ce que j’avais en tête en termes d’œuvres d’art, mais c’était définitivement émouvant et une expérience passionnante. Essayons d’autres invites de texte.</p><h4>Concept Art avec MidJourney</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/0*VZRuputbRKCZUVyr.png" /></figure><p>Ici, l’art conceptuel semble plutôt bon et abstrait alors que je faisais référence à la littérature (<a href="https://fr.wikipedia.org/wiki/Dune_(roman)">Dune</a>, “l’Épice”) et que j’avais un personnage représenté en tête. Lorsque j’ai mis à l’échelle l’image en bas à droite, nous pouvons voir que plus de détails ont commencé à apparaître, c’était intéressant. Le rendu ajoute plus de pixels et parfois l’image diffère beaucoup de la version réduite. Sur l’image de droite, on voit peut-être une “princesse galactique” cachée dans le sable ?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/0*PXfEC74qGajAmBpz.png" /></figure><p>J’ai aussi utilisé des personnages de<a href="https://www.supergiantgames.com/games/hades/"> jeux vidéo</a> comme référence. Les visages sont plutôt bons. La référence de Thanatos est liée à la mort dans la mythologie grecque, que l’outil semble avoir reprise (n’a pas beaucoup compris les références au jeu, mais ça a toujours l’air plutôt “cool” en ce qui concerne les œuvres d’art générées !)</p><p>Je ne m’attendais donc pas à ce que MidJourney les connaisse, mais comme il a été entrainé sur énormément de paires de textes et d’images, je me demandais s’il produirait quelque chose de cohérent.</p><p>Au final ça a bien été le cas. C’est esthétiquement agréable et peut passer comme étant “créé” par un humain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/0*GEcke2NFI9pCdyVo" /></figure><p>À propos du processus : au début, vous obtenez quelque chose qui est vraiment flou et qui se précise un peu plus pour que vous puissiez voir le modèle progresser étape par étape tout en utilisant l’outil de MidJourney.</p><p>Le simple fait de voir le processus peut apporter un sentiment d’émerveillement et de joie en allant du début du pixel à l’image finale !</p><h4>Dreamstudio (Diffusion Stable)</h4><p>Dreamstudio by Stability.ai est un autre outil open-source exploitant un modèle appelé “Stable Diffusion”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/0*yDKIzDM8M494YFYW" /></figure><p>Il y a certainement une controverse autour de la diffusion stable et avec raison, comme nous pouvons le voir, il fonctionne merveilleusement bien dans la création d’images dans le “style” d’artistes contemporains bien connus.</p><p>La raison c’est que ce modèle a été entraîné sur un ensemble de données avec des images de ces artistes (ce qui est une zone grise légalement, nous y reviendrons ensuite).</p><p>Les autres n’ont pas été en mesure de produire quelque chose d’assez similaire bien que MidJourney se targue de générer de l’art “populaire” (il a définitivement un style distinctif et est capable de plaire à un large public).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*H5dX1Cer-lpQhwdF" /></figure><h3>Recap</h3><p>A partir de ce que j’ai tenté, j’ai essayé de faire un tableau décrivant les “spécialités” (note: MidJourney a pu évoluer depuis avec la v4) pour chacun de ces outils.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*atoLjTsE8eXFPzFa" /></figure><p>Actuellement : les créations artistiques d’une IA ne peuvent pas être protégées par les lois sur le droit d’auteur. *DALL-E autorise désormais les visages</p><h3>À propos des limites</h3><ol><li>C’est <strong>polluant</strong> d’entraîner de tels modèles. Ils ont fait fonctionner des machines GPU pendant des jours (environ 30 jours pour certains) avec beaucoup de calculs nécessaires… Cela a été difficile d’obtenir des informations précises à ce sujet. Ces modèles contiennent également des milliards de variables qui sont utilisées chaque fois que ça génère quelque chose de nouveau ! Cela dit, les modèles sont de plus en plus optimisés, maintenant vous pouvez même exécuter le modèle de diffusion stable sur des cartes graphiques grand public car il ne contient « que » 890 millions de variables.</li><li>Il y a un <strong>biais</strong> dans les modèles. Parce que vous avez besoin d’un ensemble de données de formation volumineux, ces entreprises utilisent des ensembles de données extraits du Web tels que <a href="https://laion.ai/">LAION </a>, qui est en effet autorisé à des fins de recherche. Cela signifie qu’il n’est <strong>“pas destiné à la production ou à l’application dans le monde réel”</strong>. mais ces outils deviennent ensuite disponibles au public pour un <strong>usage commercial</strong>, ce qui est <strong>problématique</strong>. Les données mises au rebut signifient qu’elles ne sont pas organisées, qu’elles comportent des <strong>biais </strong>inhérents et qu’elles peuvent inclure des <strong>stéréotypes </strong>et des <strong>représentations nuisibles</strong> qui sont ensuite apprises par le modèle. DALL-E a supprimé le contenu le plus explicite des données de formation. Certaines entreprises ont également des politiques de contenu dans lesquelles vous n’êtes pas autorisé à utiliser des prompts spécifiques et vous devez vous conformer à leur politique de sécurité.</li><li><strong>rapide</strong> : le domaine continuera d’évoluer rapidement et la <strong>législation a du mal à suivre</strong>, il n’y a pas de législation sur ce qui est généré, les images générées par l’IA ne sont pas protégées par le droit d’auteur même si certaines entreprises derrière ces outils revendiquent le droit d’auteur sur eux et offrent <strong>une utilisation commerciale </strong>sous conditions à leurs clients.</li><li>En termes d’ <strong>éthique</strong> , c’est aussi un sujet <strong>sensible </strong>: qui est le créateur au final ? Est-ce l’utilisateur, le modèle ou les artistes originaux (une combinaison de tous ?). À des fins de recherche, c’est bien d’utiliser des données trouvées sur la toile, le problème se pose lorsque ces outils sont fournis en tant que services que vous pouvez utiliser commercialement. De plus, comment serait-il possible pour les artistes de <strong>retirer leur art des données de formation si leurs données ont été utilisées contre leur volonté</strong> ? Ils ne peuvent pas le faire parce que le modèle a déjà été formé et appris de lui, donc c’est encore flou.</li></ol><p>Dans l’ensemble, il y a un <strong>manque de transparence et de responsabilité</strong> : il était un peu difficile d’obtenir des informations sur l’ensemble de données utilisé. Tout cela pose un risque de fraude et de plagiat endémiques en raison de la disponibilité généralisée de ces outils et technologies sur le marché.</p><p>En ce qui concerne MidJourney, ce sont des milliards d’images, mais aussi des <strong>œuvres d’art protégées par le droit d’auteur </strong>d’Artstation et de Deviantart qui ont été utilisées pour la formation, ce qui explique également pourquoi c’est un art conceptuel et une illustration grand public bien générés. Quant à Dreamstudio (diffusion stable), c’est assez similaire aussi.</p><p>Il y a aussi un débat sur l’open source : la plupart des entreprises privées gardent leurs modèles secrets parce qu’elles supposent qu’ils ne sont pas sûrs pour une diffusion publique (jusqu’à ce qu’il y ait des mécanismes en place pour prévenir les abus) et accessibles en version bêta d’abord : c’est un bon début de principe à mon avis pour essayer d’utiliser ces outils de manière responsable.</p><blockquote>Il semble plus éthique de former un modèle sur vos propres créations passées ou de limiter les œuvres artistiques du domaine public et les images open source dans un jeu de données d’entrainement de modèle.</blockquote><h3>Potentiel — La technologie au service de la création</h3><p>La technologie est déjà utilisée pour aider à automatiser les processus fastidieux d’animation 2D et 3D : l’IA remplit les images intermédiaires en calculant des trajectoires réalistes basées sur l’entraînement, la séquence d’images suivante en est un exemple pour un personnage de jeu vidéo (<a href="https://montreal.ubisoft.com/fr/accelerer-la-creation-danimations-avec-linterpolation-automatique/">Ubisoft LaForge</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/0*wDnSL_3T7ZUaQqkn" /></figure><p>Il existe également des fonctionnalités dans <a href="https://www.clipstudio.net/">les logiciels de peinture numérique</a> qui visent à aider les artistes tels que :</p><ul><li>le remplissage intelligent : savoir où colorier en se basant sur un lineart.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kKUlU1qtm_8HBRHb" /></figure><ul><li>le Débruitage (rééchantillonnement des images et effacement du bruit pour réutiliser votre travail antérieur sous forme d’image plus grande.)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wd3DXCXxTqfoOXy_" /></figure><ul><li>la colorisation automatisée (phase d’expérimentation dans la plupart des logiciels, ne fonctionne pas très bien)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/0*NLSRfKbu8SghhUrt" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/0*J04r58yw4bTl0tKF" /></figure><h4>Le design à la portée de tous</h4><p>Ainsi, le plus grand changement avec cette technologie est que la conception, pour passer de l’idéation (pour le moment, on démarre toujours avec du texte) à un rendu fini à partager est accessible à tous. Cela aura un impact énorme sur la façon dont nous nous rapportons à, interagissons avec et procédons à la création artistique.</p><p>Certains créateurs ne sont pas inquiets et c’est vrai que ça ne change pas forcément l’être humain dans la boucle. La collaboration humaine, la vision et les retouches existent toujours dans ce genre de métiers techniques traitant d’une vision artistique. Il permet en fait la créativité en comblant le fossé entre les idées et les compétences techniques, cela ressemble surtout à un moteur de recherche surpuissant.</p><p>De mon côté, je n’oserais pas prétendre qu’une œuvre générée par elle m’appartient car cela n’aurait aucun sens pour moi et avec mon rapport à la pratique artistique et à mon métier. Cependant, je vois le potentiel pour la conception de produits, mais aussi pour générer des moodboards et m’en inspirer.</p><p>Voici quelques exemples de créateurs qui utilisent ces outils de nouvelles façons :</p><p><a href="https://www.instagram.com/reel/Ch45WyoJ3M5/">https://www.instagram.com/reel/Ch45WyoJ3M5/</a></p><p>Utilisation de DALL-E et d’autres outils pour générer des tenues en marchant, la fausse vidéo de <a href="https://www.instagram.com/p/Ch45WyoJ3M5">@karenxchang</a> : cette créatrice a généré des tenues à partir de DALL-E et les a toutes combinées dans une jolie petite démo, l’image donnée à DALL-E était tout son corps, DALL-E changeait à chaque fois la tenue. Elle n’avait plus qu’à assembler les images statiques en une vidéo.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F0fDJXmqdN-A%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0fDJXmqdN-A&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0fDJXmqdN-A%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d92ae1565d8b4ddc716ec6cfa5f9bcba/href">https://medium.com/media/d92ae1565d8b4ddc716ec6cfa5f9bcba/href</a></iframe><p>Cette vidéo utilise de l’IA pour générer ses images relatives aux paroles de la musique, elle nécessitait encore du travail supplémentaire au-delà des paroles de la chanson pour réaliser la vidéo musicale que le créateur recherchait : il a modifié les paroles, ajouté des images clés pour le mouvement de la caméra et les a synchronisées, il a donc fallu de l’effort humain.</p><h3>En conclusion, qu’est-ce que cela signifie pour les créateurs ?</h3><p>Au final, ces outils permettent aux créateurs de :</p><ul><li>Supprimer la barrière technique associée à la maîtrise de l’artisanat et des outils, cela permet aux gens de partir d’idées et de générer des photos d’art ou réalistes, qui peuvent les inspirer et sont partageables.</li><li>L’utiliser comme un moyen efficace de s’inspirer rapidement (images de référence), l’intégrer dans leur flux de travail (inspiration, retouche)</li><li><strong>Devenir trop dépendant</strong> : les générateurs d’images sont toujours basés sur l’ensemble de données d’entraînement qu’ils ont alimenté, ce qui équivaut à une “base de connaissances”; cela peut donc limiter la créativité et restreindre la vision si l’on ne s’appuie que sur ça.</li></ul><blockquote>C’est pourquoi il est réaliste de dire que nous avons encore besoin d’artistes et que le modèle en aurait encore besoin pour se tenir au courant des tendances… donc cela plairait maintenant, mais qu’en est-il du futur ou du style vraiment spécifique qui émerge demain ?</blockquote><h4>Secteurs potentiels impactés</h4><ul><li>Industrie des médias</li><li>Industrie du design et de la mode</li><li>Etc.</li></ul><p>Au fait, <a href="https://www.linkedin.com/posts/yasmine-maricar_microsoft-designer-stunning-designs-in-activity-6986007643425243136--Uu3/?utm_source=share&amp;utm_medium=member_desktop">Microsoft Designer</a> vient de sortir en bêta fermée (il utilise DALL-E)!</p><p>Pour conclure, voici la nouvelle fonctionnalité de DALL-E, “out-painting”, qui est absolument passionnante à voir:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FnvGYqGsST6w%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DnvGYqGsST6w&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FnvGYqGsST6w%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/87eaebe6f616538e7a2d38a1f83f4c4c/href">https://medium.com/media/87eaebe6f616538e7a2d38a1f83f4c4c/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oe3oCI1u-TMGYSP9" /><figcaption>“La Jeune Fille à la perle” avec un arrière-plan rempli de “surpeinture”. <em>August Kamp / OpenAI / Johannes Vermeer (</em> j’aime particulièrement le fait qu’ils mettent ici l’attribution à tous les créateurs)</figcaption></figure><h3>Réflexions finales autour du sujet</h3><p>Dans l’ensemble, c’était super amusant à expérimenter même si je me méfiais de ses capacités en raison du battage médiatique et de la méfiance venant du monde de l’art.</p><ul><li>Il doit y avoir une <strong>conversation ouverte</strong> , car cela a un impact sur la façon dont nous nous rapportons, interagissons et comprenons l’art et la créativité en général</li><li>Les changements sont difficiles à suivre, mais je conseillerais à quiconque d’essayer de suivre les nouvelles possibilités offertes.</li></ul><p>Dans mon cas, c’est quand je vois des communautés dont je fais partie impactées que j’essaie d’acquérir des connaissances à ce sujet. Je préfère démystifier les choses et en tant que technologue et artiste, j’utilise quotidiennement les fonctionnalités populaires des logiciels pour m’aider à automatiser certaines des tâches de la peinture numérique, mais c’est un tout autre niveau. Personnellement, cela ne me procure aucune joie et ne me viendrait pas à l’esprit de dire que quelque chose qu’un modèle d’IA a généré m’appartient, cependant</p><blockquote>Il y a le frisson de générer quelque chose à partir de mots en quelques secondes et de voir ce que l’IA va produire, alimenté par tout cet imaginaire humain</blockquote><p><strong>Si vous avez trouvé cet article intéressant :</strong> vous pouvez rechercher mes autres articles, vous pouvez également <a href="https://ymaricar.medium.com/subscribe"><strong>vous abonner</strong></a><strong> </strong>pour être averti lorsque je publie de nouveaux articles, et vous pouvez également me suivre ou me contacter sur <a href="https://www.linkedin.com/in/yasmine-maricar">LinkedIn </a><strong>. </strong>Merci pour la lecture :)</p><p><em>Publié originellement sur </em><a href="https://www.linkedin.com/pulse/opinion-piece-how-ai-supercharging-human-creativity-yasmine-maricar/"><em>https://www.linkedin.com</em></a><em> le 26 Octobre 2022.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16e71cdd6773" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How is AI supercharging Human Creativity?]]></title>
            <link>https://ymaricar.medium.com/how-is-ai-supercharging-human-creativity-28fdc55facea?source=rss-9693af168e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/28fdc55facea</guid>
            <category><![CDATA[dalle-2]]></category>
            <category><![CDATA[midjourney]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[art]]></category>
            <dc:creator><![CDATA[Yasmine Maricar]]></dc:creator>
            <pubDate>Thu, 27 Oct 2022 22:17:02 GMT</pubDate>
            <atom:updated>2022-10-28T15:51:44.857Z</atom:updated>
            <content:encoded><![CDATA[<p>AI image generators are becoming ubiquitous and have seen a significant rise during the last summer with the release of open source models with tremendous capabilities such as <a href="https://www.theverge.com/2022/9/1/23332684/ai-generated-artwork-wins-state-fair-competition-colorado">MidJourney</a>.</p><p>This topic is one I am deeply interested in and the advances in the field have been mind-blowing, especially since I am both an artist and a ML developer. Thus, I wanted to dig deeper into these new tools and give you an overview and my current thoughts.</p><p>This article is an extended version of a short talk I gave at Microsoft during an internal sharing session around various topics. I am part of the Canadian AI specialised cloud architects, where we help every organization to achieve more with data &amp; AI.</p><h3>First : a primer on text-to-art generators</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*DKNGzoJGgyb8Dy-j7CxCAw.png" /><figcaption>Prompt : <strong><em>“the Little Prince Saint Exupéry and his fox friend in the forest watching over a bunch of flowers” </em></strong>with MidJourney</figcaption></figure><p>This image has been generated with such a tool, I generated that by writing a text prompt, here it was “ the Little Prince Saint Exupéry and his fox friend in the forest watching over a bunch of flowers “</p><p>Of course in my mind I has a certain vision of that, Little Prince is a book and I wanted an illustration with the said characters. In that case, it seems to be a pretty good artwork, quite abstract in a sense with an ethereal feel but still pretty good in its “reinterpretation”. It’s shocking in that sense, as we could call this “artistic”, however, let’s see how it works behind the scenes and how it made this tool make such “believable” artworks.</p><p>Most of the recent image generator tools work like that, it takes a prompt as an input and then it takes a few seconds, up to 30 seconds I’d say to generate a few images.</p><p>Under the hood, they mostly work with the latest breakthrough in text-to-images models : it’s called <strong>diffusion models</strong>.</p><p>The “text guided” part refers to the fact that the model is learning associations between millions of captions and image pairs. That’s how it can learn to generate images linked to a specific text prompt.</p><p>As for the second part, which is diffusion, it refers to the fact that the model kind of tried to do the reverse process, understanding how each paint droplet was put on an artwork.</p><p>Basically, it learns by destroying the training data by adding noise, so that’s the first step in the figure below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*Q2wx28OU0LynJoQLF4X_vw.png" /></figure><p>Then it learns to recover the data step by step by reversing the noising process so it can simply be illustrated like that.</p><p>In fact, the model has learned from all of this and will be outputting pixel values step by step until full depiction of a picture.</p><p>It’s not necessarily using the images in themselves, but it has millions to billions of model variables that are used each time it tries to generate something new, so it just needs a text prompt and it will generate something from noise. You can also regenerate from the same text prompt and you’ll usually get different results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*Kjq8wRYR04Fa3SrpjRIzKg.png" /></figure><h3>Let’s compare different image generation tools</h3><h3>DALL-E by OpenAI</h3><p><a href="https://openai.com/dall-e-2/">DALL-E</a> by Open AI (private company) was the first one to gain critical exposure through its text-to-image capabilities, how does it compare with these open-source newcomers?</p><p>The name DALL-E is a combination of WALL-E (the Pixar movie) and Salvador Dalí the artist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*wLMIIk7NRzuAHfksC5EaTw.png" /></figure><p>Here, I generated images depicting an astronaut in a tropical resort. The images generated are interesting and I wanted to modify the astronaut so that it was a distinctively female astronaut sipping a cocktail (yes, in space). With DALL-E, one can modify part of an image by highlighting it and changing the prompt, as you can see here, it was quite effective.</p><p>One can also go from an image and generate variations from it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*7K98UuuWQJQtJatOUbUuIw.png" /></figure><p>DALL-E also prides itself in product design ideation to image, I just put what I had in mind as a product as a text prompt and ta-da!, I got super realistic photos! Impressive!</p><h3>MidJourney’s tool</h3><p>MidJourney is proposing a Discord bot with which to interact in order to generate images and we have two choices : upscale an image or generate other variations from it. One text prompt generates 4 different images in a 2x2 grid:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*M8_g4QbZ2MvPgrlOQih5OQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*04Tz9XTEHgF9kC4ikQNICA.png" /></figure><p>Here I chose to do a string of operations to observe MidJourney’s capabilities in concept art &amp; illustration as it’s mostly well-known for that. It gave me some nice options even though it didn’t exactly follow my prompt as I wanted. this process of iterating and reengineering the words that you use is not dissimilar to getting to know a new search engine and “fine-tune” your keywords, it’s now almost an art, called “prompt engineering”</p><p>Who knows, maybe we’ll have prompt engineers experts in the future x) Note: people are already publishing books and content related to prompt engineering and leveraging AI tools for artistic creation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*7yC2GCr6jhL0uaZI-nd4oQ.png" /></figure><p>I tried generating variations from the generated images by using the “v3” button referring to the bottom left image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*tENmZ9CKwQ6J-T-FjugaeQ.png" /></figure><p>Midjourney wasn’t good with faces however, it’s been evolving pretty quickly.</p><p>You can also regenerate from the same original prompt and get different results.</p><p>Overall it wasn’t necessarily what I had in mind in terms of artwork but it definitely was moving and an exciting experiment. Let’s try some other prompts.</p><h3>Midjourney concept art</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*vIg4oda5VSabPQmkqslnDQ.png" /></figure><p>Here, the concept art looks pretty good and abstract whereas I was referencing litterature (Dune, Spice) and had a character depicted in mind. When I upscaled the bottom right image, we can see that more details started appearing, that was interesting. The rendering does add in more pixels and sometimes the image differs a lot from the minimized version. On the right image, we can maybe see a “galactic princess” hiding in the sand?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*u7FDrPtVE8YMPtDCwyOCyQ.png" /></figure><p>I also used some <a href="https://www.supergiantgames.com/games/hades/">video game characters</a> as reference. Faces somewhat good. The reference of Thanatos is linked to death in greek mythology, which it seems to have picked up(didn’t get the references from the game that much, still looks pretty “cool” as for the artworks generated!)</p><p>Well, I wasn’t expecting MidJourney to know them, but because it was trained on so many texts and images pairs, I was wondering if it would output something coherent.</p><p>In the end it did. It is aesthetically pleasing and realistic to have been “made” by a human.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*132bUZy-Cj9YROgXQzfxBw.png" /></figure><p>About the process: at first you get something that’s really blurry and it precise itself a bit more so you can see the model progressing step by step while using MidJourney’s tool.</p><p>Just seeing the process can bring a sense of wonderment and joy in getting from the start of the pixel to the final picture!</p><h3>Dreamstudio (Stable Diffusion)</h3><p>Dreamstudio by Stability.ai is another open-source tool leveraging a model called “Stable Diffusion”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*zTr-bKR0_YssZs3Jdtxn7w.png" /></figure><p>There definitely is a controversy surrounding Stable diffusion and with reason, as we can see it performs marvelously well in creating images in the “style” of well-known contemporary artists. The reason is that it has been training on a dataset with images from these artists (which is a grey area, we’ll ponder around that next).</p><p>The others haven’t been able to produce something quite similar although MidJourney prides itself in generating “popular” art (it definitely has a distinctive style and is able to appeal to a large audience).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*J8f3lj1XRvmv9KYyW-iVCQ.png" /></figure><h3>Recap</h3><p>From what I tried out, I tried making a table depicting the “specialties” for each of these tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aeg_5enz4DmX4oUemILGGQ.png" /></figure><p>At the moment : the artistic creations of an AI can’t be protected under copyright laws. | *DALL-E now allows faces</p><h3>About the limitations</h3><ol><li>It’s <strong>polluting </strong>to train such models. They made GPU machines run for days (around 30 days for some) with a lot of compute needed, it was hard to get information about that. It also has billions of variables that are used each time it generates something new! Models are becoming more and more optimized though, now you can even run Stable diffusion model on consumer grade graphic cards because it “only” has 890 million variables.</li><li>There is <strong>Bias </strong>within the models. Because you need a large training dataset, these companies have been using web scraped datasets such as <a href="https://laion.ai/">LAION</a>, which is indeed authorized for research purposes. It means it’s ‘’not meant for real-world production or application.” but these tools then become available to the public for commercial use so that’s problematic. Scrapped data means that it’s not curated, it comes with inherent biases and it can include harmful stereotypes and representations that are then learned by the model. DALL-E did remove the most explicit content from the training data. Some of the companies also have content policies where you are not allowed to query specific prompts and you have to comply with their safety policy.</li><li><strong>fast-paced </strong>: The field will keep evolving quickly and legislation has a hard time to keep up, there is no legislation over what is generated, AI generated images are not copyrighted even though some companies behind these tools claim copyright over them and offer commercial use under conditions to their customers.</li><li>In terms of <strong>ethics</strong>, it’s also a sensitive topic: who’s the creator in the end? Is it the user, the model or the original artists (a combination of all?). For research purposes, it’s fine to use scrapped data, the problem arises when these tools are provided as services that you can use commercially. Furthermore, how would it be possible for artists to take down their art from the training data if their data has been used against their will? They can’t do that because the model has already been trained and learned from it, so it’s still blurry.</li></ol><p>Overall, there is a lack of transparency and accountability : It was a bit hard to get info on which dataset has been used. This all poses a risk of rampant fraud and plagiarism because of the mainstream availability of these tools and technologies on the market.</p><p>Regarding MidJourney, it was billions of images, but also copyrighted art from Artstation and Deviantart that was used for training, that also explains why it’s a good generated mainstream concept art and illustration. As for Dreamstudio (stable diffusion), it’s pretty similar as well.</p><p>There also is an open source debate : most of the private companies are keeping models under wraps because they assume they are not safe for public release (up until there are mechanisms in place to prevent abuse) and accessible as a beta first: it’s a pretty good principle in my opinion in terms of trying to apply responsible AI.</p><blockquote><em>It seems to be more ethical to train a model on your own past creations or limit the artistic works from the public domain and open source images in a training dataset.</em></blockquote><h3>Potential — Technology at the service of creation</h3><p>Technology is already being used to help automate tedious process in 2D and 3D animation : AI filling the in-between frames by calculating realistic trajectories based on training, the following image sequence is such an example for a video game character (Ubisoft LaForge).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*hkZ2qa36_tF0VBinoshKng.png" /></figure><p>There are also features in <a href="https://www.clipstudio.net/">digital painting software</a> that are aiming to help artists such as :</p><ul><li>Smart filling : knowing where to color based on a lineart.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MQbm1RKXtRR3jH23" /></figure><ul><li>Denoising (Resample images and erase jpeg noise to reuse your past work as a larger image.)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2CX_MLW5ixBDkeVR" /></figure><ul><li>Colorization (experimentation phase in most software, not working that well)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/0*76IngY3hmDiar-d2" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/0*Q4RQXYbRQGdeapI7" /></figure><h3>Design at everyone’s reach</h3><p>Thus, the biggest change with this technology is that design, to go from ideation (you still need to go from text-based prompts now…) to a rendered design to share is accessible to anyone. This will have a tremendous impact in the way we relate to, interact with and go about creating art.</p><p>Some creators are not worried and it’s true that it doesn’t necessarily change the human being in the loop. Human collaboration, vision and reworks still exist in these kind of technical jobs dealing with an artistic vision. It actually enables creativity by breaching the gap between ideas and technical skills, it mostly feels like a superpowered search engine.</p><p>On my side, I wouldn’t dare claim an artwork generated by it was my own because it would make no sense for me and with how I relate with art practice and my craft. However I can see the potential for product design, but also generating mood boards and getting inspiration from these.</p><p>Here are some examples of creators using these tools in new ways:</p><p><a href="https://www.instagram.com/reel/Ch45WyoJ3M5/">https://www.instagram.com/reel/Ch45WyoJ3M5/</a></p><ul><li>&gt; Using DALL-E &amp; other tools to generate outfits while walking fake video by <a href="https://www.instagram.com/p/Ch45WyoJ3M5">@karenxchang</a> : this creator generated outfits from DALLE and combined them all in a nice little demo, the image given to DALLE was their entire body, DALLE every time changed the outfit. They just had to assemble the static images.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F0fDJXmqdN-A%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0fDJXmqdN-A&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0fDJXmqdN-A%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/40f4dd985bcf0d9faa93756fafd74a97/href">https://medium.com/media/40f4dd985bcf0d9faa93756fafd74a97/href</a></iframe><p>This video is using AI to generate its images relating to music lyrics, it still required additional input beyond just the song lyrics to achieve the music video he was looking for: they modified lyrics, added keyframes for camera motion and synchronized them so it did take human effort.</p><h3>In conclusion, what does it means for creators?</h3><p>In the end these tools enable creators to:</p><ul><li>remove the technical barrier associated with mastering craft and tools, it allows people to go from ideas and generate art or realistic photos from them, that can get them inspired and are shareable.</li><li>use it as an effective way to get inspired quickly (reference images), Integrate into their workflow (inspiration, rework)</li><li>Get too reliant: image generators are still based on the training dataset it was fed, equivalent to a “knowledge base” : it thus can limit creativity &amp; restrict vision if one only relies on that</li></ul><blockquote><em>That’s why it’s realistic to say we still need artists and the model would still need that too to keep up-to-date with trends… so this would appeal now but what about in the future or really specific style that emerges tomorrow?</em></blockquote><h3>Potential sectors impacted</h3><ul><li>Media industry</li><li>Design and fashion industry</li><li>Etc.</li></ul><p>By the way, <a href="https://www.linkedin.com/posts/yasmine-maricar_microsoft-designer-stunning-designs-in-activity-6986007643425243136--Uu3?utm_source=share&amp;utm_medium=member_desktop">Microsoft Designer</a> just released in closed beta (it uses DALL-E)!</p><p>To wrap it up, here’s DALL-E newest feature, “out-painting”, which is absolutely enthralling to see</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FnvGYqGsST6w%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DnvGYqGsST6w&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FnvGYqGsST6w%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3ebca1c8974d27eb4de5101b00ab15c3/href">https://medium.com/media/3ebca1c8974d27eb4de5101b00ab15c3/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uqnjKAmn1DqAYWRb" /><figcaption>“Girl with a Pearl Earring” with an “outpainting”-filled background. <em>August Kamp / OpenAI / Johannes Vermeer</em></figcaption></figure><p><em>(</em> I especially like the fact they put attribution to all the creators here)</p><h3>Final thoughts around the topic</h3><p>Overall, it was super fun to experiment with even though I was wary of its capabilities due to the hype and wariness coming from the art world.</p><ul><li>There needs to be an <strong>open conversation</strong>, because this impact how we relate to, interact with and understand art and creativity in general</li><li>The changes are hard to follow but I’d advise anyone to try and keep up with the new possibilities offered out there. In my case it’s when I see communities that I am part of impacted that I try to gain knowledge about it. I prefer to demystify things and as a technologist and artist, I do use popular features from software daily to help me automate some of the tasks in digital painting but this is a whole other level. Personally, it gives me no joy and wouldn’t come to my mind to say that something an AI model generated is mine, However</li></ul><blockquote><em>There is the thrill of generating something from words in seconds and seeing what the AI will output, fed by all this human imaginary</em></blockquote><h3>If you have found it interesting:</h3><p>You can look for my other articles, you can also <a href="https://ymaricar.medium.com/subscribe"><strong>subscribe</strong> </a>to get notified when I publish articles, and you can also connect or reach out to me on <a href="https://www.linkedin.com/in/yasmine-maricar"><strong>LinkedIn</strong></a><strong>. </strong>Thank you for reading :)</p><p><em>Originally published at </em><a href="https://www.linkedin.com/pulse/opinion-piece-how-ai-supercharging-human-creativity-yasmine-maricar/"><em>https://www.linkedin.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28fdc55facea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimize your data science workflow within Jupyter Notebook using mlflow and pandas-profiling!]]></title>
            <link>https://medium.com/towards-ml-engineering/optimize-your-data-science-workflow-within-jupyter-notebook-e630be868cdf?source=rss-9693af168e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e630be868cdf</guid>
            <category><![CDATA[ml-engineering]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[mlflow]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Yasmine Maricar]]></dc:creator>
            <pubDate>Thu, 27 Oct 2022 00:22:30 GMT</pubDate>
            <atom:updated>2022-10-28T12:20:38.736Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2TWMik0opspv8Wl_Ji5u8g.png" /><figcaption>Article banner image generated with DALL-e and modified</figcaption></figure><h3><strong>Introduction</strong></h3><p>· There are many benefits from optimizing the data science experimentation workflow: it simplifies and eases Data Science work which in turn leads to more experiments being carried out and a higher probability of success for the project.</p><p>· Building ML pipelines during experimentation can save up time, makes code more readable, improve reproducibility and reduce time-to-market for a ML model into production-ready code (#mlengineering)</p><p>· Using a tool such as mlflow to consistently log metrics from experiments moves the results out of the notebook environment, providing better viewing and reliable tracking.</p><h3>I) Sample project: Kickstarter campaigns’ prediction of success</h3><p>Cleaning up data and doing exploratory data analysis is a crucial part of any Data Science based project as your results will only be as trustworthy and conclusive as the data (=the examples) it will be trained on.</p><p>Furthermore, Data Scientists often have to experiment in a short amount of time — depending on the project’s duration and return on investment on quick experimentations — to get preliminary results, the work involves training and evaluating multiple models on one dataset.</p><p>Note: recently, Andrew Ng challenged this idea by urging the community to be more data-centric and less model-centric, indeed, data quality matters as well.</p><p>For this example, we will be using a dataset with Kickstarter campaigns characteristics, Kickstarter is a funding platform for creative projects, we selected the following features for the study:</p><blockquote>- Name of the project</blockquote><blockquote>- (sub) Category of the project</blockquote><blockquote>- Main Category of the project</blockquote><blockquote>- Currency of pledged money</blockquote><blockquote>- Deadline timestamp</blockquote><blockquote>- Goal amount of money</blockquote><blockquote>- Launch date timestamp</blockquote><blockquote>- Pledged money from backers (in currency)</blockquote><blockquote>- State of the project</blockquote><blockquote>- Number of backers</blockquote><blockquote>- Country of project</blockquote><blockquote>- Pledged amount of money from backers (in usd)</blockquote><p>The goal here is to predict the success of a campaign given initial launch features, it can be translated as predicting if a project will get a backer’s sufficient funding before the deadline. We are going to remove some features (like the number of backers) that inform about the end state and can’t be used for prediction at the start of a project.</p><p>We are going to clean up the features, generate the features needed for training and train and evaluate classification models to demonstrate how you can simply improve your exploratory data analysis and experimentation process for data science projects.</p><p>You can find the git repository, including all the code for this project, here: <a href="https://github.com/Jasminyas/kickstarter-campaign-prediction">https://github.com/Jasminyas/kickstarter-campaign-prediction</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3J5X1HnkwQX8QbVa3J35Cg.png" /><figcaption>Figure 1 — Rows from the dataset</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*702dC3IPzNRRlHrnZ72O7g.png" /><figcaption>Figure 2 — Machine Learning development process</figcaption></figure><h3>II) Optimizing the exploratory data analysis (EDA) part using data visualization libraries</h3><p>At the beginning of this project, we are going to explore the data and plot multiple graphs that make us understand how the categories and other features associated with Kickstarter projects are distributed among failing and successful states (which is the target variable). It requires a lot of code to generate the appropriate graphs using <em>plotly </em>and <em>seaborn</em>.</p><p>I really like using <em>plotly </em>to generate dynamic graphs, however it can sometimes be troublesome to calculate the right values to plot with <em>plotly </em>functions, furthermore, the rendered charts are heavy (a lot of them in one notebook and it can make it lag).</p><p>That is why I also use seaborn for fast visualization and if you compute some numbers or do some graphs enough, it’s always a good thing to think about reusability and code <em>utils</em> visualization function (you could even package it as a python library to use in multiple scripts) and thus reuse those functions every time you need to do EDA for a project!</p><pre>import seaborn as sns<br>plt.style.use(&#39;ggplot&#39;)</pre><pre>def plot_continuous_vars(data, column_name):<br>    plot_dims   = (14, 8)<br>    fig, (ax1,   ax2) = plt.subplots(ncols=2, sharey=False,   figsize=dims)<br>    sns.distplot(data[column_name], ax=ax1)<br>    sns.distplot(np.log1p(data[column_name]), ax=ax2)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*tDIICxcvP9y1fL3jh_dvNw.png" /><figcaption>Figure 3 — Plotting continuous and log-transform of usd_goal variable</figcaption></figure><p>This work done once can be reused for the next projects. It is with that in mind that we can also optimize our workflow by using the next library introduced in the next section.</p><p><em>-&gt; Pandas-profiling for outlier detection, correlation, and feature distributions in one place</em></p><p>Another library that is helpful for this exploratory and cleaning up phase of the data is <a href="https://pandas-profiling.github.io/pandas-profiling/docs/master/rtd/pages/introduction.html">pandas-profiling</a> , it can easily generate graphs with associated useful statistics for all the variables of your dataset and it also renders correlation heatmaps for all the features, this can be integrated as widgets inside the notebook or standalone html files, you can find the html file here: <a href="https://github.com/Jasminyas/kickstarter-campaign-prediction/blob/main/kickstarterds.html">https://github.com/Jasminyas/kickstarter-campaign-prediction/blob/main/kickstarterds.html</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*EQE-QsQHreD0aUYYdO3PFQ.png" /><figcaption>Figure 4 — Generating the html report using pandas-profiling</figcaption></figure><p>You just need two lines to generate this rich html file that contains all the graphs you need to make decisions regarding outliers removal, dropping of correlated features and further investigation on problematic ones. I suggest you do that at the beginning of making the training dataset.</p><h3>III) Optimize the ML pipeline for model training part</h3><p>Now that we have seen how we could improve the data analysis phase, let us move onto the model training part.</p><p>Let’s see how sklearn pipelines can come in handy for preparing the data and applying different models with good modularity and reusability.</p><p>1) Preprocessing pipeline</p><p>Here we have numeric variables we want to scale and categorical features we are going to encode with the OneHotEncoder provided by scikit-learn :</p><pre>from sklearn.compose import ColumnTransformer<br>from sklearn.impute import SimpleImputer<br>from sklearn.linear_model import LogisticRegression<br>from sklearn.model_selection import GridSearchCV, StratifiedKFold<br>from sklearn.pipeline import make_pipeline, Pipeline<br>from sklearn.preprocessing import StandardScaler, RobustScaler, OneHotEncoder</pre><pre>numeric_features = [&#39;usd_goal_corrected&#39;, &#39;duration&#39;, &#39;len_name&#39;]</pre><pre>numeric_transformer = Pipeline(<br>    steps=[<br>        (&quot;imputer&quot;, SimpleImputer(strategy=&quot;mean&quot;)),<br>        (&quot;scaler&quot;, RobustScaler()),<br>    ]<br>)</pre><pre>categorical_features = [&#39;country&#39;, &#39;cat_full&#39;, &#39;month&#39;, &#39;name_non_chars&#39;, &#39;name_has_symbol&#39;, &#39;name_upper&#39;]<br>categorical_transformer = Pipeline(<br>    steps=[(&quot;onehot&quot;, OneHotEncoder(handle_unknown=&quot;ignore&quot;))]<br>)</pre><pre>preprocessing = ColumnTransformer(<br>    transformers=[<br>        (&quot;num&quot;, numeric_transformer, numeric_features),<br>        (&quot;cat&quot;, categorical_transformer, categorical_features),<br>    ],<br>    remainder=&quot;passthrough&quot;,<br>)</pre><p>As you can see we made a processing step that will take care of the features transformations for us.</p><p>Now, we can just use these steps easily and apply different classifiers :</p><pre># precision-recall curve and f1 for evaluation purposes</pre><pre>from sklearn.datasets import make_classification<br>from sklearn.linear_model import LogisticRegression<br>from sklearn.model_selection import train_test_split<br>from sklearn.metrics import precision_recall_curve<br>from sklearn.metrics import f1_score<br>from sklearn.metrics import auc<br>from matplotlib import pyplot</pre><pre>lr = LogisticRegression(solver=&#39;liblinear&#39;)<br>model = Pipeline([(&#39;preprocessing&#39;, preprocessing),<br>                (&#39;lr&#39;,lr)])<br>model.fit(x_train, y_train)</pre><pre>#predict_plot is outputting the precision-recall curve with the associated auc and precision score.<br>predict_plot(x_train, y_train, model, &quot;Logistic Regression&quot;)<br>predict_plot(x_test, y_test, model, &quot;Logistic Regression&quot;)</pre><p>You just need to replace the classifier by another one. Here’s another example with a decision tree-based algorithm from <a href="https://lightgbm.readthedocs.io/en/latest/">LightGBM</a> library:</p><pre>from lightgbm import LGBMClassifier</pre><pre>clf = make_pipeline(<br>    preprocessing,<br>    LGBMClassifier(learning_rate=0.7, boosting_type=&quot;gbdt&quot;, objective=&#39;binary&#39;, metric=&#39;precision&#39;, max_depth=-1)<br>)</pre><pre>clf.fit(x_train, y_train)<br>    <br>predict_plot(x_train, y_train, clf, &#39;GBM&#39;)</pre><p>Now, we can also use this pipeline in grid search to find the optimal parameters.</p><p>You first need to create a parameters grid for your specific model. In the following code, you’ll note that we need to prefix each parameter name with the classifier name (here it’s ‘clf’).</p><p>First I created this basic class that inherits from <a href="https://scikit-learn.org/stable/developers/develop.html">BaseEstimator</a> :</p><pre>from sklearn.base import BaseEstimator</pre><pre>class ClfSwitcher(BaseEstimator):</pre><pre>def __init__(<br>        self, <br>        estimator = LogisticRegression(),<br>    ):<br>        &quot;&quot;&quot;<br>        A Custom BaseEstimator that can switch between classifiers.<br>        :param estimator: sklearn object - The classifier<br>        &quot;&quot;&quot;</pre><pre>self.estimator = estimator</pre><pre>def fit(self, X, y=None, **kwargs):<br>        self.estimator.fit(X, y)<br>        return self</pre><pre>def predict(self, X, y=None):<br>        return self.estimator.predict(X)</pre><pre>def predict_proba(self, X):<br>        return self.estimator.predict_proba(X)</pre><pre>def score(self, X, y):<br>        return self.estimator.score(X, y)</pre><p>Then I can call it here:</p><pre>parameters = [<br>    {<br>        &#39;clf__estimator&#39;: [LogisticRegression()],<br>        &#39;clf__estimator__solver&#39;: [&quot;lbfgs&quot;, &quot;liblinear&quot;],<br>        &quot;clf__estimator__penalty&quot;: [&quot;l2&quot;],<br>        &quot;clf__estimator__C&quot;: [0.1, 0.2, 0.3, 0.5, 1.0],<br>        &quot;clf__estimator__max_iter&quot;: [100, 1000, 2000],<br>    },<br>    {<br>        &#39;clf__estimator&#39;: [LogisticRegression()],<br>        &#39;clf__estimator__solver&#39;: [&quot;liblinear&quot;],<br>        &quot;clf__estimator__penalty&quot;: [&quot;l1&quot;],<br>        &quot;clf__estimator__C&quot;: [0.1, 0.2, 0.3, 0.5, 1.0],<br>        &quot;clf__estimator__max_iter&quot;: [100, 1000, 2000],<br>    },<br>]</pre><pre>gscv = GridSearchCV(pipeline, parameters, cv=2, n_jobs=-1, verbose=3)<br>gs_model = gscv.fit(x_train, y_train)</pre><pre>print(gs_model.best_params_, gs_model.best_score_)</pre><p>Without sklearn pipelines, the code would have been messy and keeping track of experiments would be hard. It helps in automating the process of applying and evaluating models and the code is close to production-readiness with that kind of modular, reusable functions. These functions can also be used in all your experiments to accelerate training with different models.</p><h3>IV) Use Jupyter Notebook with MLflow to keep a record of experimentations</h3><p>We can leverage mlflow which is an open-source tracking tool for data science experiments, here I am going to show you the piece of code that saves up my experiments and useful visuals locally — you will find them in a folder named ‘mlruns’ where your Notebook is located:</p><pre>from pprint import pprint<br>import mlflow</pre><pre>clf = make_pipeline(<br> preprocessing,<br> LGBMClassifier(learning_rate=0.7, boosting_type=&quot;gbdt&quot;, objective=&#39;binary&#39;, metric=&#39;precision&#39;, max_depth=-1)<br>)</pre><pre>def fetch_logged_data(run_id):<br> client = mlflow.tracking.MlflowClient()<br> data = client.get_run(run_id).data<br> tags = {k: v for k, v in data.tags.items() if not k.startswith(&quot;mlflow.&quot;)}<br> artifacts = [f.path for f in client.list_artifacts(run_id, &quot;model&quot;)]<br> return data.params, data.metrics, tags, artifacts</pre><pre># enable autologging for sklearn based modelsmlflow.sklearn.autolog()</pre><pre>with mlflow.start_run() as run:<br> clf.fit(x_train, y_train)</pre><pre># fetch logged data<br>params, metrics, tags, artifacts = fetch_logged_data(run.info.run_id)</pre><pre>## sanity checks<br>pprint(params)<br>pprint(metrics)<br>pprint(tags)<br>pprint(artifacts)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*gAJ0aJDaMlmywVNMQhI6DA.png" /><figcaption>Figure 5 — Models metrics saved with mlflow</figcaption></figure><p>It will save up all the metrics, the model and useful plots in the mlflow folder locally, you can find more information about how to set it up with a server in their documentation : <a href="https://www.mlflow.org/docs/latest/tracking.html#where-runs-are-recorded">where are runs recorded</a> ?</p><p>You can access the files through the UI by running “<em>mlflow ui</em>” in a terminal at the root path that contains the mlflow directory.<br>On the UI platform, we can order by variables, for instance here I could use training_accuracy to order the runs in a descending order and see which model is at the top.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*EvgTleL8bvIzywKbHVOn_A.png" /><figcaption>Figure 6 — mlflow UI interface</figcaption></figure><p>By clicking on an experiment, you can access all the graphs and metrics that were registered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*pHbg4OnsrTYDE5xPG2AWsA.png" /><figcaption>Figure 7 — mlflow UI interface (specific run)</figcaption></figure><p>You can then select the model in accordance with the metrics chosen for evaluation purposes for every project.</p><h3>Conclusion</h3><p>We saw how one can optimize the Data Science experimentation process for rapid prototyping and evaluation of models. One should bear in mind that Notebooks should be used for experimenting and that while Data Scientist coding in a modular and reusable way in notebooks is useful for the sharing of notebooks and the preparation to put in production, they are not meant to be production ready in themselves. All these tools are meant to facilitate the experimentation phase and pinpoint the right algorithms to be used in a production environment.</p><h3>If you have found it interesting:</h3><p>You can look for my other articles, you can also <a href="https://ymaricar.medium.com/subscribe"><strong>subscribe</strong> </a>to get notified when I publish articles, and you can also connect or reach out to me on <a href="https://www.linkedin.com/in/yasmine-maricar"><strong>LinkedIn</strong></a><strong>. </strong>Thank you for reading :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e630be868cdf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/towards-ml-engineering/optimize-your-data-science-workflow-within-jupyter-notebook-e630be868cdf">Optimize your data science workflow within Jupyter Notebook using mlflow and pandas-profiling!</a> was originally published in <a href="https://medium.com/towards-ml-engineering">Towards ML engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ressources en Machine Learning]]></title>
            <link>https://ymaricar.medium.com/ressources-en-machine-learning-cours-758025c9d10b?source=rss-9693af168e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/758025c9d10b</guid>
            <category><![CDATA[coursera]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Yasmine Maricar]]></dc:creator>
            <pubDate>Wed, 01 Aug 2018 15:25:18 GMT</pubDate>
            <atom:updated>2018-08-03T09:09:31.911Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pCPCFY3wrSjApnZ57h5NLw.jpeg" /></figure><p>Bonjour à tous,</p><p>J’ai décidé d’écrire un premier petit article à destination de ceux qui souhaitent s’initier/aller plus loin en Machine Learning et ne savent pas forcément par où commencer.</p><p>Je vous présente donc une petite liste de ressources pour débuter dans ce domaine.</p><p>Dans le domaine de l’apprentissage automatique et de la science des données, il nous faut tout d’abord de solides bases en mathématiques (algèbre linéaire, statistiques/probabilités et optimisation mathématique sont de mise).</p><p><strong>I ) Les notions de mathématiques et statistiques</strong></p><p>Pour les probas et les stats, vous pouvez passer cette étape (2 moocs intéressants) :</p><p><a href="https://lagunita.stanford.edu/courses/course-v1:OLI+ProbStat+Open_Jan2017/info">https://lagunita.stanford.edu/courses/course-v1:OLI+ProbStat+Open_Jan2017/info</a></p><p><a href="https://lagunita.stanford.edu/courses/HumanitiesSciences/StatLearning/Winter2016/info">https://lagunita.stanford.edu/courses/HumanitiesSciences/StatLearning/Winter2016/info</a></p><p>D’autres ressources utiles provenant de Stanford :</p><ol><li>Convex Optimisation : <a href="http://cs229.stanford.edu/section/cs229-cvxopt.pdf">http://cs229.stanford.edu/section/cs229-cvxopt.pdf</a></li><li>Probability Theory : <a href="http://cs229.stanford.edu/section/cs229-prob.pdf">http://cs229.stanford.edu/section/cs229-prob.pdf</a></li><li>Linear Algebra (!) : <a href="http://cs229.stanford.edu/section/cs229-linalg.pdf">http://cs229.stanford.edu/section/cs229-linalg.pdf</a></li></ol><p>Je vous renvoie à cet article détaillé pour plus d’informations concernant les mathématiques utiles pour la data science :</p><p><a href="https://elitedatascience.com/learn-math-for-data-science">https://elitedatascience.com/learn-math-for-data-science</a></p><p>En réalité, vous pouvez très bien commencer les cours cités ci-après et qui rentrent dans le vif du sujet, sans avoir au préalable compilé les ressources citées, car les cours sont destinés aux personnes débutantes, et des petits rappels vous seront sans doute donnés. Je vous recommande de commencer les cours suivants si vous avez déjà quelques bases en mathématiques, et vous référer aux sources ci-dessus si vous avez besoin de revoir certains points/vous rafraîchir la mémoire.</p><p><strong>II ) Cours en ligne</strong></p><p><a href="https://www.datacamp.com/courses/intro-to-python-for-data-science">https://www.datacamp.com/courses/intro-to-python-for-data-science</a> : ce cours permet une introduction à Python et la Data Science.</p><p>Il serait utile pour vous d’avoir de bonnes bases en Python et des connaissances en R qui est également assez utilisé en data science et peut être bien à maitriser.</p><p>Les deux cours principaux que je vous recommande sont ceux d’Andrew Ng, chercheur en IA et ancien professeur à Stanford (il a entre autres travaillé pour Google et Baidu dans ce domaine).</p><p>Andrew est très pédagogue et ses cours sont vraiment bien :)</p><ol><li><strong>Machine Learning : </strong><a href="https://www.coursera.org/learn/machine-learning"><strong>https://www.coursera.org/learn/machine-learning</strong></a></li><li><strong>Deep Learning : </strong><a href="https://www.coursera.org/specializations/deep-learning"><strong>https://www.coursera.org/specializations/deep-learning</strong></a><strong> -&gt; meilleur pour directement commencer des projets liés à de la Computer Vision avec des réseaux de neurones !</strong></li></ol><p>Je vous recommande aussi les cours interactifs de Datacamp et Kaggle pour le Machine Learning (notebooks incrustés dans la page pour coder, et guidé) :</p><ol><li><strong>DATACAMP tutorials : </strong><a href="https://www.datacamp.com/">https://www.datacamp.com/</a></li><li><strong>Kaggle Learn : </strong><a href="https://www.kaggle.com/learn/overview">https://www.kaggle.com/learn/overview</a></li><li><strong>plateforme de learning Google : </strong><a href="https://ai.google/education#?modal_active=none">https://ai.google/education#?modal_active=none</a></li></ol><p>PS : vous pouvez accéder au contenu du cours gratuitement en appuyant sur « auditeur libre » quand vous vous inscrivez à chaque cours.</p><p><strong>III) Plateformes de compétition et échanges de la communauté</strong></p><p>Rien de mieux que de faire des projets pour apprendre, je vous recommande d’essayer de faire les projets de Kaggle (c’est une plateforme web organisant des compétitions en science des données. Sur cette plateforme, les entreprises proposent des problèmes en science des données et offrent un prix aux data scientists offrant les meilleures performances. ) référencés comme étant éducatifs, pour commencer :</p><p>Un tutoriel datacamp autour du Dataset Titanic sur Kaggle : <a href="https://www.datacamp.com/community/open-courses/kaggle-python-tutorial-on-machine-learning">https://www.datacamp.com/community/open-courses/kaggle-python-tutorial-on-machine-learning</a></p><p>Les compétitions « getting started » sur Kaggle :</p><p><a href="https://www.kaggle.com/competitions?sortBy=grouped&amp;group=general&amp;page=1&amp;pageSize=20&amp;category=gettingStarted">https://www.kaggle.com/competitions?sortBy=grouped&amp;group=general&amp;page=1&amp;pageSize=20&amp;category=gettingStarted</a></p><p>Les communautés data science sont nombreuses sur <a href="http://meetup.com/">meetup.com</a>, des meetups sont souvent organisés sur Paris. (n’hésitez pas à voir mes groupes sur mon profil et vous inscrire aux prochains meetups qui vous intéressent : <a href="https://www.meetup.com/fr-FR/Paris-Datageeks/members/199484445/">https://www.meetup.com/fr-FR/Paris-Datageeks/members/199484445/</a> )</p><p>Il y a également des groupes facebook ou Twitter ou encore Quora qui peuvent accueillir des échanges autour de la data science.</p><p><strong>IV) Ressources complémentaires (compilation)</strong></p><p>Sites de data scientists utiles : https://machinelearningmastery.com/</p><p>un « stackoverflow » de la data : https://www.kdnuggets.com/</p><p>J’espère que ce post vous aura été utile, il y a encore beaucoup de ressources disponibles sur internet, à vous de jouer en vous lançant dans des projets data !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=758025c9d10b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>