mastodontech.de ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Offen für alle (über 16) und bereitgestellt von Markus'Blog

Serverstatistik:

1,5 Tsd.
aktive Profile

#rembg

0 Beiträge0 Beteiligte0 Beiträge heute
Don<p><strong>Transforming Family Photos into Festive Holiday Cards with AI</strong></p><p>There are several open-source tools available this year for creating holiday cards. If you have a wonderful photo of your family or grandchildren, but it was taken during a different season and you’d like to change the background, there’s a Python module called <strong>rembg</strong> that can help you with that. To get started, you’ll need to set up a Python virtual environment and install the necessary dependencies. I created a directory named <strong>rembg</strong> using the following command:</p><pre><code>$ mkdir rembg </code></pre><p>Then I setup a Python virtual environment.</p><p><code>python3 -m venv /home/don/rembg</code></p><p>Then I activate the environment with the following command.</p><p><code>source /home/don/rembg/bin/activate</code></p><p>Then I install <strong>rembg</strong>:</p><p><code>pip3 install rembg</code></p><p>I want to use rembg from the command line so I make the following additional installation:</p><p><code>pip3 install "rembg[cli]"</code></p><p>Then I install <strong>onnxruntime</strong> which is a [machine learning accelerator](<a href="https://github.com/microsoft/onnxruntime" rel="nofollow noopener" target="_blank">GitHub – microsoft/onnxruntime: ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator</a>).</p><p><code>pip3 install onnxruntime</code></p><p>Now I am ready to remove the background from the image that I have chosen. This is a recent picture of my wife and I taken in the fall of the year. I like the picture but I want it to have a festive background.</p>Photo by <a href="https://www.sissyhorch.com/" rel="nofollow noopener" target="_blank">https://www.sissyhorch.com/</a><p>I make sure that my image is in the <strong>rembg</strong> folder and then execute the following command. The <strong>i</strong> switch means that I am operating at the file level.</p><p><code>rembg i grandparents.jpg grandparents_no_bg.jpg</code></p><p>In the command above I renamed the output file so that I would still have my original just in case I wanted to use it again. You can see below that the background has been removed from the image above.</p><p>I can create a nice background for my card with InkScape and add some festive lettering and use a Pointsettia I downloaded from <a href="https://openclipart.org" rel="nofollow noopener" target="_blank">Openclipart.org</a>. The completed card is shown below.</p>Created with InkScape, OpenClipart.org by Don Watkins CC by SA 4.0<p></p><p><a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://donwatkins.info/tag/ai/" target="_blank">#AI</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://donwatkins.info/tag/python/" target="_blank">#Python</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://donwatkins.info/tag/rembg/" target="_blank">#rembg</a></p>
Jörg Kantel<p>Apple zensuriert! Warum ich wieder Rembg brauche</p><p>Da hatte ich doch vor ein paar Wochen stolz verkündet, daß ich mit meinem »neuen« Mac Mini auf die Python-Bibliothek Rembg zum Freistellen von Hintergründen verzichten könne, da Apples Vorschau dies ebensogut erledigen würde. Nun muß ich allerdings zurückrudern, denn Apples Vorschau zensuriert! <a href="https://kantel.github.io/posts/2024091601_apple_zensuriert/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kantel.github.io/posts/2024091</span><span class="invisible">601_apple_zensuriert/</span></a> <a href="https://mastodon.social/tags/Rembg" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Rembg</span></a> <a href="https://mastodon.social/tags/Bildgeneratoren" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Bildgeneratoren</span></a> <a href="https://mastodon.social/tags/K%C3%BCnstlicheIntelligenz" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>KünstlicheIntelligenz</span></a> <a href="https://mastodon.social/tags/Apple" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Apple</span></a> <a href="https://mastodon.social/tags/Zensur" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Zensur</span></a></p>
Jörg Kantel<p>Rembg - Kann die KI auch weiße Kaninchen?</p><p>Gestern hatte ich mir noch einmal Rembg vorgeknöpft, denn mich interessierte natürlich brennend die Frage, ohne deren Antwort Ihr vermutlich auch nicht mehr ruhig schlafen könnt: Kann die gekünstelte Intelligenzia auch weiße Kaninchen freistellen? Spoiler: Sie kann – wenn auch mit Abstrichen. <a href="https://kantel.github.io/posts/2024021101_white_rabbit/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kantel.github.io/posts/2024021</span><span class="invisible">101_white_rabbit/</span></a> <a href="https://mastodon.social/tags/Rembg" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Rembg</span></a> <a href="https://mastodon.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://mastodon.social/tags/CreativeCoding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CreativeCoding</span></a> <a href="https://mastodon.social/tags/K%C3%BCnstlicheIntelligenz" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>KünstlicheIntelligenz</span></a> <a href="https://mastodon.social/tags/GameDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>GameDev</span></a> <a href="https://mastodon.social/tags/InteracktiveFiction" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>InteracktiveFiction</span></a></p>
Jörg Kantel<p>Rembg – Bildhintergrund mit Python entfernen</p><p>Als Geheimwaffe, um Bilder vom Hintergrund freizustellen, wurde mir häufig die freie (MIT-Lizenz) Python-Bibliothek Rembg empfohlen. Doch auch, wenn das Teil auf PyPI zu finden und daher leicht zu installieren war, hatte ich es nicht zum Laufen bekommen. Bis ich dann heute über diese Anleitung stolperte. <a href="https://kantel.github.io/posts/2024020702_rembg/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kantel.github.io/posts/2024020</span><span class="invisible">702_rembg/</span></a> <a href="https://mastodon.social/tags/Rembg" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Rembg</span></a> <a href="https://mastodon.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://mastodon.social/tags/Bildbearbeitung" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Bildbearbeitung</span></a></p>