Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koorosh/poker-vision
https://github.com/koorosh/poker-vision
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/koorosh/poker-vision
- Owner: koorosh
- Created: 2018-11-13T07:42:24.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-17T16:12:49.000Z (about 6 years ago)
- Last Synced: 2024-10-27T17:37:23.200Z (2 months ago)
- Language: Python
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# poker-vision
## Setup
- Create empty directories in your project:
```bash
mkdir ./data ./images ./models ./zoo_models
```
- Run docker container
```bash
docker-compose up -d
```## Prepare data
- Copy images and annotation files to ./images directory
- Convert images to TF_Record format:
```bash
# Run from /models/research folderpython /sh/create_pascal_tf_record.py \
--label_map_path=/data/poker_label_map.pbtxt \
--data_dir=/images/POKER20181113 \
--year=Poker2018 \
--set=train \
--output_path=/data/poker_train.recordpython /sh/create_pascal_tf_record.py \
--label_map_path=/data/poker_label_map.pbtxt \
--data_dir=/images/POKER20181113 \
--year=Poker2018 \
--set=val \
--output_path=/data/poker_val.record
```## Run model training
- Adjust existing model with checkpoints and config
- Run actual training
```bash
# From the tensorflow/models/research/ directoryPIPELINE_CONFIG_PATH=/models/2018-11-13_ssdlite_mobilenet_v2/ssdlite_mobilenet_v2_coco.config
MODEL_DIR=/models/2018-11-13_ssdlite_mobilenet_v2
NUM_TRAIN_STEPS=50000
SAMPLE_1_OF_N_EVAL_EXAMPLES=1
python object_detection/model_main.py \
--pipeline_config_path=${PIPELINE_CONFIG_PATH} \
--model_dir=${MODEL_DIR} \
--num_train_steps=${NUM_TRAIN_STEPS} \
--sample_1_of_n_eval_examples=$SAMPLE_1_OF_N_EVAL_EXAMPLES \
--alsologtostderr
```## Export frozen_model for inference
```bash
# From tensorflow/models/research/
INPUT_TYPE=image_tensor
PIPELINE_CONFIG_PATH={path to pipeline config file}
TRAINED_CKPT_PREFIX={path to model.ckpt}
EXPORT_DIR={path to folder that will be used for export}
python object_detection/export_inference_graph.py \
--input_type=${INPUT_TYPE} \
--pipeline_config_path=${PIPELINE_CONFIG_PATH} \
--trained_checkpoint_prefix=${TRAINED_CKPT_PREFIX} \
--output_directory=${EXPORT_DIR}
```