Skip to content

Commit

Permalink
Update model tarball to latest URL.
Browse files Browse the repository at this point in the history
Add extraction and cleanup into download script
Directory canned_models --> all_models
  • Loading branch information
Mike Tyka committed May 1, 2019
1 parent 401407d commit 58dd272
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ together with the Edge TPU Python API.
Before you start using the examples run
the ```download_models.sh``` script in order to download a selection of models.
These canned models will be downloaded and extracted to a new folder
```canned_models```.
```all_models```.


Further requirements may be needed by the different camera libraries, check the
Expand Down
5 changes: 4 additions & 1 deletion download_models.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

wget http://storage.googleapis.com/cloud-iot-edge-pretrained-models/canned_models.tar.gz
mkdir -p all_models
wget https://dl.google.com/coral/canned_models/all_models.tar.gz
tar -C all_models -xvzf all_models.tar.gz
rm -f all_models.tar.gz
2 changes: 1 addition & 1 deletion gstreamer/classify.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def generate_svg(dwg, text_lines):
dwg.add(dwg.text(line, insert=(10, y*20), fill='white', font_size='20'))

def main():
default_model_dir = "../canned_models"
default_model_dir = "../all_models"
default_model = 'mobilenet_v2_1.0_224_quant_edgetpu.tflite'
default_labels = 'imagenet_labels.txt'
parser = argparse.ArgumentParser()
Expand Down
2 changes: 1 addition & 1 deletion gstreamer/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def generate_svg(dwg, objs, labels, text_lines):
fill='red', fill_opacity=0.3, stroke='white'))

def main():
default_model_dir = '../canned_models'
default_model_dir = '../all_models'
default_model = 'mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite'
default_labels = 'coco_labels.txt'
parser = argparse.ArgumentParser()
Expand Down
2 changes: 1 addition & 1 deletion raspicam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ python3 classify_capture.py
You can change the model and the labels file using flags:

```
python3 classify_capture.py --model ../canned_models/inception_v3_299_quant_edgetpu.tflite
python3 classify_capture.py --model ../all_models/inception_v3_299_quant_edgetpu.tflite
```
2 changes: 1 addition & 1 deletion raspicam/classify_capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import edgetpu.classification.engine

def main():
default_model_dir = "../canned_models"
default_model_dir = "../all_models"
default_model = 'mobilenet_v2_1.0_224_quant_edgetpu.tflite'
default_labels = 'imagenet_labels.txt'
parser = argparse.ArgumentParser()
Expand Down

0 comments on commit 58dd272

Please sign in to comment.