Skip to content

ledleledle/WebCBIR

Repository files navigation

WebCBIR

This repo reffer from this Repository and i just convert it to some web. I'm using Argon Template which its nice :) . Its just like google image search but i just showing 5 picture most relevant (hopefully most relevant with object). Like always... Its just a school project. The datasets focus on desert, sea and mountain, also i add some wrong random image for testing. Sadly the datasets still have duplicate :(

Demo

Go to cbir.leonprasetya.my.id

Before you start

  • Don't ask me how to clone retard :')
  • Basic understanding of linux command line, python and docker

Dependencies that we need

  • Python 3.x
  • virtualenv

Installation

Arch Linux

sudo pacman -Syu python-pip python-virtualenv

Ubuntu

Follow this tutorial!. And

pip install --upgrade pip
sudo apt install libgl1-mesa-glx

Windows

Too much GUI Installer and a bit tricky compared by Linux, and I didn't like that alot.
Follow this tutorial to install Python, pip and virtualenv. Then you'll be okay. Also, if you're facing problem like this.

FileNotFoundError: [Errno 2] No such file or directory: 'c:\\users\\sweet\\appdata\\local\\programs\\python\\python37\\Lib\\venv\\scripts\\nt\\python.exe'

Then you'll have to read this!
FYI : For Windows users. No GUI please, only CMD.

Usage

Basic Usage

  • Go to cloned folder cd WebCBIR
  • Windows virtualenv venv and for Arch Linux & Ubuntu python3 -m venv venv
  • Activate virtualenv. Run source venv/bin/activate for Linux Family or if you're Windows user run .\venv\Scripts\activate.bat
  • Upgrade pip pip install --upgrade pip
  • For requirements. Just run pip install -r requirements.txt and you'll be okay.
  • Make sure, you already check conf directory, if nothing inside this directory, you can initialize with python init.py then recheck again, if index.csv and conf.csv has generated you're good to go.
  • Then just run the python file python runner.py
  • Open localhost:5000 on your browser
  • Enjoy
  • If you want to update the dataset, Just do it from terminal (after you copy or change the images) run python init.py, this command will will generated conf/index.csv file.

Docker

We don't need install everything else, just install docker

docker build -t webcbir .
docker run -d --name webcbir -p 5000:5000 -v $(pwd)/static/datasets:/app/datasets/coba -v $(pwd)/conf:/app/conf webcbir

If you have any changes on source code, just restart the container

docker container restart webcbir

Preview

  • Before Searching preview1
  • After Searching preview2

Note

Make PR's if you have any problem and done solving it, or maybe you want contribute in this repository, I will very welcome you guys. Cheers 🍻

TODO

  • Responsive Design
  • Add & Update Dataset Feature
  • Add more dataset for more acuracy

About

Website version based from my last CBIR project. Created with Flask

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages