microsoft / webnn-developer-preview

MIT License
38 stars 7 forks source link

[Image Classification] Measure the performance of session.run() in ORT rather than classifier() of Transformer.js #7

Closed ibelem closed 3 months ago

ibelem commented 3 months ago

This Image Classification demo is based on Transformer.js, which experimentally enabled WebNN by modifying some source code of Transformer.js.

const classifier = await pipeline('image-classification', modelPath, options);
const url = 'tiger.jpg';
const output = await classifier(url);

Image Classification:

  1. Swapped the original perf.html and index.html
  2. Removed the new perf.html

@Adele101 PTAL

ibelem commented 3 months ago

Thanks @fdwr 's review, nearly all the format issues have been fixed. PTAL