Skip to content

Commit

Permalink
Add CPU versions, update filenames.
Browse files Browse the repository at this point in the history
* Adds CPU versions of the models.
* Rename edgetpu files to end in _edgetpu to match all other models.
  • Loading branch information
mbrooksx committed Jul 2, 2021
1 parent 655a354 commit 445735b
Show file tree
Hide file tree
Showing 26 changed files with 4 additions and 18 deletions.
18 changes: 2 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,8 @@ trade-offs in these versions, MobileNet will be faster than ResNet but
less accurate; larger resolutions are slower but allow a wider field of
view (allowing further-away people to be processed correctly).

This can be changed with the `--model` flag. The following models are
provided:

```bash
models/bodypix_mobilenet_v1_075_1024_768_16_quant_edgetpu_decoder.tflite
models/bodypix_mobilenet_v1_075_1280_720_16_quant_edgetpu_decoder.tflite
models/bodypix_mobilenet_v1_075_480_352_16_quant_edgetpu_decoder.tflite
models/bodypix_mobilenet_v1_075_640_480_16_quant_edgetpu_decoder.tflite
models/bodypix_mobilenet_v1_075_768_576_16_quant_edgetpu_decoder.tflite
models/bodypix_resnet_50_416_288_16_quant_edgetpu_decoder.tflite
models/bodypix_resnet_50_640_480_16_quant_edgetpu_decoder.tflite
models/bodypix_resnet_50_768_496_32_quant_edgetpu_decoder.tflite
models/bodypix_resnet_50_864_624_32_quant_edgetpu_decoder.tflite
models/bodypix_resnet_50_928_672_16_quant_edgetpu_decoder.tflite
models/bodypix_resnet_50_960_736_32_quant_edgetpu_decoder.tflite
```
This can be changed with the `--model` flag. Both EdgeTPU and CPU models can
be found in the `models` folder.

You can change the camera resolution by using the `--width` and `--height`
parameter. Note that in general the camera resolution should equal or exceed
Expand Down
2 changes: 1 addition & 1 deletion bodypix.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def main():
print('Error: both mutually exclusive options h264 and jpeg set')
sys.exit(1)

default_model = 'models/bodypix_mobilenet_v1_075_640_480_16_quant_edgetpu_decoder.tflite'
default_model = 'models/bodypix_mobilenet_v1_075_640_480_16_quant_decoder_edgetpu.tflite'
model = args.model if args.model else default_model
print('Model: {}'.format(model))

Expand Down
2 changes: 1 addition & 1 deletion bodypix_gl_imx.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ def main():
print('Error: both mutually exclusive options h264 and jpeg set')
sys.exit(1)

default_model = 'models/bodypix_mobilenet_v1_075_1024_768_16_quant_edgetpu_decoder.tflite'
default_model = 'models/bodypix_mobilenet_v1_075_1024_768_16_quant_decoder_edgetpu.tflite'
model = args.model if args.model else default_model
print('Model: {}'.format(model))

Expand Down
Loading

0 comments on commit 445735b

Please sign in to comment.