Settings

Theme

Ask HN: Local Image Classification in the Browser?

3 points by JawsOfALion a year ago · 3 comments · 2 min read


I want to create a chromium extension, one of the main components of the extension is classifying images (think dynamic content filtering, a few different categories, one of which is recognizing inappropriate content).

Originally I wanted to use a multimodal llm to classify images, because they tend to do quite well at classifying images with little dev effort, but it seems like it won't be possible to my knowledge to get a local model working with a Chrome extension, and an api call for each image will be too expensive as my goal is for it to be free to use.

So next I looked into tensorflow mobile net, and tried this specific example:

https://github.com/tensorflow/tfjs-examples/tree/master/chrome-extension

It looked promising and while it technically worked, it seemed to do very poorly on categorizing most things(except tigers, it seemed to consistently recognize them well). Accuracy was far too low.

Anyways I would like to hear opinions of people who are more knowledgeable in this field, what's the best solution to do a rough, but accurate classification of images with the least dev effort and runnable on a browser? Should I invest time experimenting with other tensorflow mobilenet models, or should I expect fairly low accuracy in them too? (I would like to as much as possible avoid investing in the effort of training my own custom model at this stage)

sfmz a year ago

Sounds like you are reimplementing Wingman Jr; there are some technical reasons why there is not yet a chrome port -- idk if they are still relevant.

https://github.com/wingman-jr-addon/wingman_jr/issues/2

  • JawsOfALionOP a year ago

    Thanks for sharing this project, it indeed shares much similarity with what i want to do with it, so i'll have a look. But it should be possible to achieve the same thing on chrome - but it might not be a straight port (my chrome extension can work at hiding images based on the classification i get from the tensorflow mobilenet, but the accuracy is so poor currently it's not worth using)

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection