OM Simple Encoder
Project description
Om Simple Encoder
Om Simple Encoder is to fintune the query encoder. Currently it includes only query image encoder.
Install
pip install om_simple_encoder
How to start training
python train.py --img_dir {image_root_path} --data {data json} --num_workers=15 --gpus=1 --batch_size=64
Data Format
[ {"key1": ["/path/image1.jpg","/path/image2.jpg"], "key2": ["/path/image1.jpg","/path/image2.jpg"]},...]
Demo
from om_simple_encoder.encoder import Encoder
h_enc = Encoder("brand_model_v1.ckpt")
encoded_embeddings = h_enc.images(["a.png"])
print (encoded_embeddings)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.