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": ["image1.jpg","image2.jpg"], "key2": ["image1.jpg","image2.jpg"]},...]
Demo prediction
from om_simple_encoder.encoder import Encoder
h_enc = Encoder("brand_model_v1.ckpt")
encoded_embeddings = h_enc.images(["a.png"])
print (encoded_embeddings)
Demo Train
from om_simple_encoder import train
if __name__ == '__main__':
train.start_train(model_type="resnet50", img_dir="/mnt/soco1/brands", data="brands.json", batch_size=64)
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.
Source Distribution
File details
Details for the file om_simple_encoder-0.1.3.tar.gz
.
File metadata
- Download URL: om_simple_encoder-0.1.3.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.26.0 setuptools/58.2.0 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5fd4a0163d00ab73eab0ca8b11c7b75ca624417a415e83c0670dbc2c37c2044 |
|
MD5 | bde82604f59710bf02dc14cd23832eae |
|
BLAKE2b-256 | 77569ae83caaafc3e4901200a2197fa541042d9b4d1f8d33916a06ddf1c77746 |