当前位置:首页 > 数据库

惊呆!200行代码就能实现的隐身术你见过么?

 如果你想把一张照片的惊呆见过某个人物去除掉,通常用PS就可以轻松去除了,行代但是实现身术如果是一段视频要你P掉一个人物,是惊呆见过不是就难倒你了呢?

最近,猿妹在GitHub上发现一个名为Real-Time-Person-Removal的行代神器,可以实时去除视频中的实现身术人物,就像下图这样:

有没有一种不明觉厉的惊呆见过赶脚,实现这样一种效果,行代其实只需要使用JavaScript在网络浏览器中使用一段200行的云服务器提供商实现身术TensorFlow.js代码就可以了。

该项目的惊呆见过创建者是一名叫Jason Mayes的谷歌工程师使用TensorFlow.js库和JavaScript 开发的,Mayes表示,行代这只是实现身术一个试验性的项目,其中的惊呆见过算法还是存在一些问题,比如它会受到人物背景的行代影响,人物整体背景越简单,云南idc服务商实现身术呈现出来的最终画面就会越真实,如果你仔细看就会发现,其实处理过的画面存在很多伪像痕迹。

不过,接下去Mayes会进一步改进他的算法,提高处理后的画面水平,甚至达到可以一次性从视频中删除多个人物的效果。

目前,Real-Time-Person-Removal在GitHub上标星2.6K,251个Fork(GitHub地址:https://github.com/jasonmayes/Real-Time-Person-Removal)

详细的代码也发上来供大家参考吧:

JS:

/**   * @license   * Copyright 2018 Google LLC. All Rights Reserved.   * Licensed under the Apache License, Version 2.0 (the "License");   * you may not use this file except in compliance with the License.   * You may obtain a copy of the License at   *   * http://www.apache.org/licenses/LICENSE-2.0   *   * Unless required by applicable law or agreed to in writing, software   * distributed under the License is distributed on an "AS IS" BASIS,   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   * See the License for the specific language governing permissions and   * limitations under the License.   * =============================================================================   */  /亿华云计算

分享到:

滇ICP备2023006006号-16