Skip to content

使用leaferjs tensorflowjs. 对 canvas 绘制的图片进行分类识别. 支持替换成自己训练的模型。 欢迎 star

Notifications You must be signed in to change notification settings

xiaoguaishou1/leafer-cocossd-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leafer + tensorflowJs

canvas 绘制的图片进行分类识别. 支持替换成自己训练的模型。

使用示例

   const leafer = new Leafer({
      view: document.getElementById("c") as HTMLCanvasElement,
      width: 500,
      height: 500,
    });

    new Promise<void>((resolve) => {
      const imgage = new Image({
        url: img && URL.createObjectURL(img!),
      });
      leafer.add(imgage);
      resolve();
    }).then(() => {
      usePlugin(LeaafercocoSsd, { type: "cocossd" });
    });

截图

识别结果

  • npm run install
  • npm run dev

About

使用leaferjs tensorflowjs. 对 canvas 绘制的图片进行分类识别. 支持替换成自己训练的模型。 欢迎 star

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published