banner
andrewji8

Being towards death

Heed not to the tree-rustling and leaf-lashing rain, Why not stroll along, whistle and sing under its rein. Lighter and better suited than horses are straw sandals and a bamboo staff, Who's afraid? A palm-leaf plaited cape provides enough to misty weather in life sustain. A thorny spring breeze sobers up the spirit, I feel a slight chill, The setting sun over the mountain offers greetings still. Looking back over the bleak passage survived, The return in time Shall not be affected by windswept rain or shine.
telegram
twitter
github

3行のコードで5秒で切り抜きができるAIツール、PSは必要ありません

今日紹介するこの神ツールは、たった 3 行のコードと 5 秒で高精度な切り抜きができます。コードを知らなくても、マウスを 2 回クリックするだけで完了します。

この切り抜きツールの精度を体感してください:

image

image

image

このツールの名前は:Remove.bg です。Python、Ruby、そしてディープラーニング技術を基に開発され、強力な AI 人工知能アルゴリズムによって、前景主体と背景画像を自動的に認識し、瞬時に切り抜きを行います。
ウェブサイト:https://www.remove.bg/zh

まず最初に Python の実装です、非常に簡単です。

ウェブサイトで API を取得して(手間を省くために私のものを使用することもできます)、1 行のコードで切り抜きライブラリをインストールします:

pip install removebg

次に、3 行のコードだけで 1 枚の切り抜きができます:

from removebg import RemoveBg
rmbg = RemoveBg("WPZ2Q4fraseKfAN9PPxxxxxx", "error.log") # 引用符内は取得したAPIです
rmbg.remove_background_from_img_file("C:/Users/sony/Desktop/1.jpg") 

1 枚だけでなく、複数の画像を一括で切り抜くこともできます(画像をフォルダに入れるだけです):

from removebg import RemoveBg
import os

rmbg = RemoveBg("WPZ2Q4fraseKfAN9PPxxxxxx", "error.log")
path = '%s/picture'%os.getcwd() #画像はプログラムと同じ階層のフォルダ「picture」に入れます
for pic in os.listdir(path):
    rmbg.remove_background_from_img_file("%s\%s"%(path,pic))

すごく便利ですね?

image
デフォルトで生成される画像の形式とサイズは標準です。1 か月に最大 50 枚の写真を無料で処理できます。より高解像度や 4K、またはより多くの画像を処理したい場合は、有料になります。
GitHub リポジトリ:https://github.com/brilam/remove-bg

image
切り抜き後にすぐに色や背景を変更することもできます:

image
オンライン版だけでなく、ソフトウェアをダウンロードしてローカルで使用することもできます。Windows/Mac/Linux の 3 つのプラットフォームに対応しています。

切り抜きは、証明写真の背景色を変更するためにも使用できます。PS を使わずにお金をかけずに再撮影したくない場合、このツールを使えばすぐに解決できます:

image

読み込み中...
文章は、創作者によって署名され、ブロックチェーンに安全に保存されています。