Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/junjihashimoto/hasktorch-yolo
https://github.com/junjihashimoto/hasktorch-yolo
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/junjihashimoto/hasktorch-yolo
- Owner: junjihashimoto
- License: mit
- Created: 2020-12-28T12:11:47.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-04T21:42:18.000Z (almost 4 years ago)
- Last Synced: 2024-08-02T10:27:34.830Z (6 months ago)
- Language: Haskell
- Size: 373 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-haskell-deep-learning - hasktorch-yolo
README
# Hasktorch Yolo
This repository develops yolov3 using hasktorch.
It is based on https://github.com/eriklindernoren/PyTorch-YOLOv3.It supports the format of the original yolo config and weight files.
See [this link](https://pjreddie.com/darknet/yolo/) for original yolo.For now, we use pre-trained weights.
We do not support testing and training, yet.The sources of the config and weight file are following links.
These are already included in this repository.```
https://raw.githubusercontent.com/eriklindernoren/PyTorch-YOLOv3/master/config/yolov3.cfg
https://pjreddie.com/media/files/yolov3.weights```
# Getting Started
### linux+cabal
```shell
git clone [email protected]:junjihashimoto/hasktorch-yolo.git
cd hasktorch-yolo
./download-weights.sh
cabal test all
```### linux+nix
```shell
git clone [email protected]:junjihashimoto/hasktorch-yolo.git
cd hasktorch-yolo
./download-weights.sh
nix-build
```# Inference
Use the following command for inference.
An image with a bounding box is output.
The execution example is fig.1.### linux+cabal
```shell
cabal run yolov3 -- config/yolov3.cfg weights/yolov3.weights test-data/train.jpg out.png
```### linux+nix
```shell
nix-build
./result-2/bin/yolov3 config/yolov3.cfg weights/yolov3.weights test-data/train.jpg out.png
```![fig.1](screenshot.png)
# Test
The command to calcurate mAP is as follows.
It supports both CPU and CUDA.### CPU
```
DEVICE=cpu cabal run yolov3-pipelined-test --enable-profiling -- config/yolov3.cfg weights/yolov3.weights ./coco.data +RTS -p -hc -N3
```### DEVICE
```
DEVICE=cuda:0 cabal run yolov3-pipelined-test --enable-profiling -- config/yolov3.cfg weights/yolov3.weights ./coco.data +RTS -p -hc -N3
```# Training
The command to train a model is as follows.
It supports both CPU and CUDA.### CPU
```
DEVICE=cpu cabal run yolov3-training --enable-profiling -- config/yolov3.cfg weights/yolov3.weights ./coco.data +RTS -p -hc -N3
```### DEVICE
```
DEVICE=cuda:0 cabal run yolov3-training --enable-profiling -- config/yolov3.cfg weights/yolov3.weights ./coco.data +RTS -p -hc -N3
```