子豪 發自 凹非寺
量子位 報導 | 公眾號 QbitAI
還記得被P到體無完膚的貝克漢姆嗎?

P到這個程度,不得不說,後期工作人員堪稱敬業典範。
在綜藝節目甚至體育比賽中,藝人們也各出奇招……

現在,碼掉紋身有了新方式,不必在精修or高糊之間做選擇了~
相關的帖子已經在reddit上獲得1.1k贊,網友們直呼:太酷了!

看看效果對比,感覺看到了紋身前的艾弗森:

這個工具叫做SkinDeep,開發者利用深度學習去掉照片中的紋身,力圖得到與Photoshop媲美的效果,從而減少工作量。
訓練效果
那麼它是如何做到的?
由於無法找到大量的紋身圖像來訓練模型,開發小哥決定自己動手。
使用Python OpenCV合成紋身圖像,將APDrawing數據集圖像,和去除背景的紋身圖案進行疊加,對於全身圖像,則是利用ArtLine完成的。

數據集中的線條圖對,可以幫助模型學習和刪除紋身線條。
利用ImageDraw和代碼,將紋身隨機放置到人體圖像上;在需要彎曲和改變角度時,還需用到Photoshop。

用修改後的Apdrawing數據集訓練模型,作者給出了模型輸出示例。包括:
用於身體正面的效果:

面部紋身和重度紋身的效果:

作者還給出了和Photoshop對比圖,看起來效果還不錯。


不過仔細看,還是殘留了一些紅色印記。
網友熱議
相當可觀的效果立刻在reddit上引起了熱議,不少網友發出「Cool」、「Awesome」的讚嘆。
不過也有網友表示:
「還是Photoshop更勝一籌。」

網友們動手嘗試的結果,也驗證了這一點:

提到紋身,很難不想到「殭屍男孩」。面對這樣高難度的挑戰,SkinDeep的表現怎麼樣?

幾乎也是高糊的狀態了,不禁讓網友聯想到了「伏地魔」……

看來模型的性能還有不少提升空間。
對此,作者也在GitHub上表示,SkinDeep模型仍在改進中。
此外,還有網友反向操作:
「你能把它顛倒一下嗎?我想加個紋身」

作者簡介
SkinDeep的開發者是Vijish Madhavan,上文中用於製作全身圖像的ArtLine(用於生成線條肖像),就是他的傑作,在GitHub上收穫了2.8K顆星。

也許SkinDeep未來可以用在電視節目中,觀眾們不必再面對高糊畫面了。
「擦除」工具的GitHub、Colab連結已在文末送上,感興趣的小夥伴可以去嘗試一下~
參考連結:
[1]https://www.reddit.com/r/MachineLearning/comments/mouyp0/p_skindeep_remove_tattoos_using_deep_learning/
[3]https://colab.research.google.com/github/vijishmadhavan/SkinDeep/blob/master/SkinDeep.ipynb
— 完 —
量子位 QbitAI · 頭條號簽約
關注我們,第一時間獲知前沿科技動態