Giter VIP home page Giter VIP logo

josephrocca / clip-image-sorter Goto Github PK

View Code? Open in Web Editor NEW
155.0 8.0 19.0 3.09 MB

Sort a folder of images according to their similarity with provided text in your browser (uses a browser-ported version of OpenAI's CLIP model and the web's new File System Access API)

Home Page: https://josephrocca.github.io/clip-image-sorter

License: MIT License

HTML 93.98% JavaScript 6.02%
clip openai openai-clip file-system-access-api

clip-image-sorter's Introduction

clip-image-sorter's People

Contributors

josephrocca avatar tomayac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clip-image-sorter's Issues

tfjs models are working

I converted your onnx models to tf saved model and with the current tfjs converter to tfjs models and it works very well. here is my code (based a lot on yours):
https://github.com/Jonathhhan/ofEmscriptenExamples/blob/main/emscriptenCLIP2/clip.js
This is how I converted the models:
tensorflowjs_converter --input_format tf_saved_model clip-text-vit-32-tf clip-text-vit-f16-tfjs --quantize_float16
tensorflowjs_converter --input_format tf_saved_model clip-image-vit-32-tf clip-image-vit-uint8-tfjs --quantize_uint8

https://huggingface.co/Jona0123456789

Failed to initialize workers locally on Chrome but deployed OK on GitHub

Hi Joe :)

There is an issue with browsers that I hope you could help me with!

On Chrome, running locally, it failed to load vips.worker.js when initializing models but ran OK when deployed to GitHub page.

On Firefox, running locally, it loaded vips.worker.js successfully. So I suppose this is an issue with the browser. Firefox does not support File System Access API, so I can only use the reddit image dataset provided.

--- Details when running locally on Chrome ---

I ran into this error when initializing the models:

Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:63342/clip-image-sorter/vips/vips.worker.js' failed to load.`.

Screenshot 2024-02-08 at 6 35 25 PM Screenshot 2024-02-08 at 6 36 43 PM

However, the file vips.worker.js is indeed available:
Screenshot 2024-02-08 at 6 36 59 PM

Any help would be greatly appreciated! Thank you :)
Huyen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.