forked from ARM-software/ML-zoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ARM-software#2 from ARM-software/yolo_v3_tiny
Added YOLO v3 Tiny
- Loading branch information
Showing
7 changed files
with
104 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.DS_STORE | ||
.DS_STORE | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
models/object_detection/yolo_v3_tiny/tflite_fp32/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# YOLO v3 Tiny FP32 | ||
|
||
## Description | ||
Yolo v3 Tiny is a object detection network, that localizes and identifies objects in an input image. This is a floating point version that takes a 416x416 input image and outputs detections for this image. This model is generated using the weights from the [https://pjreddie.com/darknet/yolo/](YOLO website). | ||
|
||
## License | ||
[Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) | ||
|
||
## Network Information | ||
| Network Information | Value | | ||
|---------------------|------------------| | ||
| Framework | TensorFlow Lite | | ||
| SHA-1 Hash | b38f7be6856eed4466493bdc86be1879f4b743fb | | ||
| Size (Bytes) | 35455980 | | ||
| Provenance | https://pjreddie.com/media/files/yolov3-tiny.weights & https://github.com/mystic123/tensorflow-yolo-v3 | | ||
| Paper | https://arxiv.org/abs/1804.02767 | | ||
|
||
## Accuracy | ||
Dataset: MS COCO Validation | ||
|
||
| Metric | Value | | ||
|--------|-------| | ||
| mAP | 0.331 | | ||
|
||
## Network Inputs | ||
| Input Node Name | Shape | Description | | ||
|-----------------|---------|-------------| | ||
| inputs | (1, 416, 416, 3) | A 416x416 floating point input image. | | ||
|
||
## Network Outputs | ||
| Output Node Name | Shape | Description | | ||
|------------------|---------|-------------| | ||
| output_boxes | (1, 2535, 85) | A 1xNx85 map of predictions, where the first 4 entries of the 3rd dimension are the bounding box coordinates and the 5th is the confidence. The remaining entries are softmax scores for each class. | |
9 changes: 9 additions & 0 deletions
9
models/object_detection/yolo_v3_tiny/tflite_fp32/recreate_model/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# YOLO v3 Tiny FP32 Model Re-Creation | ||
This folder contains a script that allows for the model to be re-created from scratch. | ||
|
||
## Requirements | ||
The script in this folder requires that the following must be installed: | ||
- Python 3.6 | ||
|
||
## Running The Script | ||
To run the script, run the following in a terminal: `./recreate_model.sh` |
37 changes: 37 additions & 0 deletions
37
models/object_detection/yolo_v3_tiny/tflite_fp32/recreate_model/recreate_model.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the License); you may | ||
# not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an AS IS BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
#!/usr/bin/env bash | ||
|
||
python3.6 -m venv venv | ||
source venv/bin/activate | ||
|
||
pip install -r requirements.txt | ||
|
||
git clone https://github.com/mystic123/tensorflow-yolo-v3 | ||
pushd tensorflow-yolo-v3 | ||
|
||
wget https://raw.githubusercontent.com/pjreddie/darknet/master/data/coco.names | ||
wget https://pjreddie.com/media/files/yolov3-tiny.weights | ||
|
||
python convert_weights_pb.py --class_names coco.names --weights_file yolov3-tiny.weights --data_format NHWC --tiny | ||
|
||
pip install tensorflow==1.15.0 | ||
|
||
tflite_convert --graph_def_file=frozen_darknet_yolov3_model.pb --output_file=yolo_v3_tiny_darknet_fp32.tflite --input_shapes=1,416,416,3 --input_arrays=inputs --output_arrays=output_boxes | ||
mv yolo_v3_tiny_darknet_fp32.tflite .. | ||
|
||
popd |
19 changes: 19 additions & 0 deletions
19
models/object_detection/yolo_v3_tiny/tflite_fp32/recreate_model/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
absl-py==0.11.0 | ||
astor==0.8.1 | ||
cached-property==1.5.2 | ||
gast==0.4.0 | ||
grpcio==1.33.2 | ||
h5py==3.1.0 | ||
importlib-metadata==2.0.0 | ||
Keras-Applications==1.0.8 | ||
Keras-Preprocessing==1.1.2 | ||
Markdown==3.3.3 | ||
numpy==1.19.4 | ||
Pillow==8.0.1 | ||
protobuf==3.14.0 | ||
six==1.15.0 | ||
tensorboard==1.11.0 | ||
tensorflow==1.11.0 | ||
termcolor==1.1.0 | ||
Werkzeug==1.0.1 | ||
zipp==3.4.0 |
3 changes: 3 additions & 0 deletions
3
models/object_detection/yolo_v3_tiny/tflite_fp32/yolo_v3_tiny_darknet_fp32.tflite
Git LFS file not shown