Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Remove scripts using darknet pretrained models #783

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions lmnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ This project is developed as one part of Blueoil project -- the deep learning mo

* Utils
* `measure_latency.py`: entry point script for measuring inference latency.
* `convert_weight_from_darknet.py`: entry point script for convert weight format form darknet framework.

- - -

Expand Down Expand Up @@ -343,34 +342,6 @@ e.g.
`PYTHONPATH=. python executor/predict.py -in ./dataset/images -o ./outputs -i lmnet_cifar10`


# Convert weight from darknet
Weight converter form darknet framework to tensorflow checkpoints file.
You can convert [Yolov2](https://pjreddie.com/darknet/yolov2/) and [Darknet19](https://pjreddie.com/darknet/imagenet/#darknet19_448) network weights.

Please download darknet weights at `inputs` dir.
```
cd inputs
wget http://pjreddie.com/media/files/darknet19_448.weights
wget https://pjreddie.com/media/files/yolo-voc.weights
```

After execute `convert_weight_from_darknet.py`, You can get checkpoints file on
* darknet19: `${OUTPUT_DIR}/convert_weight_from_darknet/darknet19/checkpoints/save.ckpt`
* yolov2: `${OUTPUT_DIR}/convert_weight_from_darknet/yolo_v2/checkpoints/save.ckpt`

```
# PYTHONPATH=. python executor/convert_weight_from_darknet.py -h
Usage: convert_weight_from_darknet.py [OPTIONS]

Options:
-m, --model [yolov2|darknet19] yolo2 or darknet19 [required]
-h, --help Show this message and exit.
```

e.g.
`PYTHONPATH=. python executor/convert_weight_from_darknet.py -m yolov2`


# Profiling model
Profiling a trained model.

Expand Down
10 changes: 0 additions & 10 deletions lmnet/tests/test_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ def test_core_configs():
check_config(config, "inference")


def test_convert_weight_from_darknet_configs():
"""Test that all config files in `configs/convert_weight_from_darknet` dir include requirement keys."""
dir_path = os.path.join("configs", "convert_weight_from_darknet")

for config_file in glob.glob(os.path.join(dir_path, "**", "*.py"), recursive=True):
config = _load_py(config_file)
check_config(config, "inference")


def test_example_config():
"""Test that example config python file include requirement keys."""

Expand Down Expand Up @@ -111,7 +102,6 @@ def test_example_object_detection_config_yaml():

if __name__ == '__main__':
test_core_configs()
test_convert_weight_from_darknet_configs()
test_example_config()
test_example_classification_config_yaml()
test_example_object_detection_config_yaml()