https://github.com/peri044/baml
Background Aware Metric Learning
https://github.com/peri044/baml
background-aware-cnn metric-learning triplet-loss
Last synced: about 1 year ago
JSON representation
Background Aware Metric Learning
- Host: GitHub
- URL: https://github.com/peri044/baml
- Owner: peri044
- Created: 2018-09-21T03:23:09.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-25T05:13:04.000Z (over 7 years ago)
- Last Synced: 2025-02-08T09:32:13.606Z (over 1 year ago)
- Topics: background-aware-cnn, metric-learning, triplet-loss
- Language: Python
- Homepage:
- Size: 523 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Background Aware Metric Learning
# Training
```bash
python train.py --base inception_v1 --batch_size 32
```
Checkout more command line options in `train.py` file. `dnn_library.py` is the interface to use any other base feature extractor.
# Generate Data
In the data folder, you can find scripts for generating positive pairs and tf records needed for training
## To generate text file of positive pairs
```bash
python gen_pos_pairs.py
```
This will generate two files train_pos_pairs.txt and test_pos_pairs.txt
## To generate TF records
```bash
python gen_data.py --path -n
```
* `--path` : Path to train_pos_pairs.txt
* `--n` : Number of examples in TF record (Default: It will write all the examples in train_pos_pairs.txt)