imgsearch

command module
v0.0.0-...-a8cc1c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2022 License: Unlicense Imports: 21 Imported by: 0

README

an image search engine in Go

This is a very basic image search engine website based on my other library, imagesim. It uses the Gin HTTP framework.

landing

search results

(uses images from the LAION-5B image dataset)

how to use

  1. Generate a database file. An example of indexing 30000 images from the Laion-5B dataset can be found in internal/index-laion.go

  2. When starting up, it will look for a database.txt file. The file is structured like this:

    /some/url/here.jpg 6845807407824432640
    /another/url/here.jpg 296956165250596863
    ...
    

    The second number stands for the image hash generated by the imagesim library. Each line is a new image entry.

  3. If you have your images saved locally, create an images folder in the same directory as the main file. It will index all images inside that folder and put them into database.txt (if it does not exist). Currently it only supports PNG and JPEG formats.

command-line arguments (-h)

-embed
    specifies whether templates and CSS should be embedded into the executable (default true)
-path string
    path to database file (default "database.txt")
-port uint
    port to start Gin on (default 8080)
-release
    specifies whether Gin should run in release mode (default true)
-serve-images
    specifies whether the images/ folder should be served

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Indexes a specified amount of images from the LAION-5B dataset: https://www.kaggle.com/datasets/vitaliykinakh/guie-laion5b-dataset
Indexes a specified amount of images from the LAION-5B dataset: https://www.kaggle.com/datasets/vitaliykinakh/guie-laion5b-dataset

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL