All Projects → IanButterworth → YOLO.jl

IanButterworth / YOLO.jl

Licence: MIT license
YOLO Object Detection in Julia

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to YOLO.jl

Alturos.ImageAnnotation
A collaborative tool for labeling image data for yolo
Stars: ✭ 47 (+14.63%)
Mutual labels:  yolo
Abnormal-behavior-Detection
Abnormal behavior detection in the video surveillance based on yolo darknet
Stars: ✭ 35 (-14.63%)
Mutual labels:  yolo
Sequoia
A neural network for CounterStrike:GlobalOffensive character detection and classification. Built on a custom-made dataset (csgo-data-collector)
Stars: ✭ 60 (+46.34%)
Mutual labels:  yolo
Expronicon.jl
Collective tools for metaprogramming on Julia Expr
Stars: ✭ 36 (-12.2%)
Mutual labels:  julia-language
Acorn.jl
A pure julia text editor
Stars: ✭ 41 (+0%)
Mutual labels:  julia-language
Julia-data-science
Data science and numerical computing with Julia
Stars: ✭ 54 (+31.71%)
Mutual labels:  julia-language
static-export-template
A template to automatically convert Pluto notebooks to an HTML website with GitHub Pages. Demo page:
Stars: ✭ 70 (+70.73%)
Mutual labels:  julia-language
jill.py
A cross-platform installer for the Julia programming language
Stars: ✭ 202 (+392.68%)
Mutual labels:  julia-language
VG AlexeyAB darknet
A forked AlexeyAB Darknet repo with extra convenient functions.
Stars: ✭ 82 (+100%)
Mutual labels:  yolo
IterTools.jl
Common functional iterator patterns
Stars: ✭ 124 (+202.44%)
Mutual labels:  julia-language
Oracle.jl
Oracle Database driver for the Julia language.
Stars: ✭ 32 (-21.95%)
Mutual labels:  julia-language
sparsezoo
Neural network model repository for highly sparse and sparse-quantized models with matching sparsification recipes
Stars: ✭ 264 (+543.9%)
Mutual labels:  yolo
ros-yolo-sort
YOLO v3, v4, v5, v6, v7 + SORT tracking + ROS platform. Supporting: YOLO with Darknet, OpenCV(DNN), OpenVINO, TensorRT(tkDNN). SORT supports python(original) and C++. (Not Deep SORT)
Stars: ✭ 162 (+295.12%)
Mutual labels:  yolo
darknet-vis
Visualize YOLO feature map in prediction for easily checking your model performance
Stars: ✭ 68 (+65.85%)
Mutual labels:  yolo
Object-Detection-Tensorflow
Object Detection API Tensorflow
Stars: ✭ 275 (+570.73%)
Mutual labels:  yolo
DataScienceTutorials.jl
A set of tutorials to show how to use Julia for data science (DataFrames, MLJ, ...)
Stars: ✭ 94 (+129.27%)
Mutual labels:  julia-language
food-detection-yolov5
🍔🍟🍗 Food analysis baseline with Theseus. Integrate object detection, image classification and multi-class semantic segmentation. 🍞🍖🍕
Stars: ✭ 68 (+65.85%)
Mutual labels:  yolo
tfjs-yolo
YOLO v3 and Tiny YOLO v1, v2, v3 with Tensorflow.js
Stars: ✭ 108 (+163.41%)
Mutual labels:  yolo
DroNet
DroNet: Efficient convolutional neural network detector for Real-Time UAV applications
Stars: ✭ 54 (+31.71%)
Mutual labels:  yolo
car-detection-yolo
Autonomous driving - car detection using the very powerful YOLO model
Stars: ✭ 73 (+78.05%)
Mutual labels:  yolo

YOLO.jl

Currently only supports loading YOLOv2-tiny and the VOC-2007 pretrained model (pretrained on Darknet).

Made possible by Yavuz Bakman's YoloV2

Consider also checking out:

  • ObjectDetector.jl -> A Flux-based implementation of YOLO (testing only)
  • Darknet.jl -> A julia wrapper of AlexeyAB's fork of Darknet (testing only)

drawing bikes cowcat cars

See below for examples or ask questions on Join the julia slack

Platform Build Status
Linux & MacOS x86
Windows 32/64-bit
Linux ARM 32/64-bit
FreeBSD x86
Codecoverage Status
Coveralls Status

Installation

The package can be installed with the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run:

pkg> add YOLO

If you have a CUDA-supported graphics card, make sure that you have CUDA set up such that it satisfies CUDAapi.jl or CuArrays.jl builds.

If you just want to run on CPU (or on a GPU-less CI instance) Knet.jl is currently dependent on a system compiler for the GPU-less conv layer, so make sure you have a compiler installed: i.e. apt-get update && apt-get install gcc g++ for linux or install visual studio for windows

Example Usage (WIP)

Testing a dataset

using YOLO

#First time only (downloads 5011 images & labels!)
YOLO.download_dataset("voc2007")

settings = YOLO.pretrained.v2_tiny_voc.load(minibatch_size=1) #run 1 image at a time
model = YOLO.v2_tiny.load(settings)
YOLO.loadWeights!(model, settings)

voc = YOLO.datasets.VOC.populate()
vocloaded = YOLO.load(voc, settings, indexes = [100]) #load image #100 (a single image)

#Run the model
res = model(vocloaded.imstack_mat);

#Convert the output into readable predictions
predictions = YOLO.postprocess(res, settings, conf_thresh = 0.3, iou_thresh = 0.3)

Testing a single custom image

To pass an image through, the image needs to be loaded, and scaled to the appropriate input size. For YOLOv2-tiny that would be (w, h, color_channels, minibatch_size) == (416, 416, 3, 1).

loadResizePadImageToFit can be used to load, resize & pad the image, while maintaining aspect ratio and anti-aliasing during the resize process.

using YOLO
## Load once
settings = YOLO.pretrained.v2_tiny_voc.load(minibatch_size=1) #run 1 image at a time
model = YOLO.v2_tiny.load(settings)
YOLO.loadWeights!(model, settings)

## Run for each image
imgmat = YOLO.loadResizePadImageToFit("image.jpeg", settings)
res = model(imgmat)
predictions = YOLO.postprocess(res, settings, conf_thresh = 0.3, iou_thresh = 0.3)

or if the image is already in memory

imgmat = loadResizePadImageToFit(img, settings)
res = model(imgmat)
predictions = YOLO.postprocess(res, settings, conf_thresh = 0.3, iou_thresh = 0.3)

Rendering results

To render results, first load Makie before YOLO (in a fresh julia instance):

using Makie, YOLO
## Repeat all above steps to load & run the model
scene = YOLO.renderResult(vocloaded.imstack_mat[:,:,:,1], predictions, settings, save_file = "test.png")
display(scene)

Testing inference speed

The package tests include a small benchmark. A 2018 macbook pro i7. CPU-only:

[ Info: YOLO_v2_tiny inference time per image: 0.1313 seconds (7.62 fps)
[ Info: YOLO_v2_tiny postprocess time per image: 0.0023 seconds (444.07 fps)
[ Info: Total time per image: 0.1336 seconds (7.49 fps)

An i7 desktop with a GTX 1070 GPU:

[ Info: YOLO_v2_tiny inference time per image: 0.0039 seconds (254.79 fps)
[ Info: YOLO_v2_tiny postprocess time per image: 0.0024 seconds (425.51 fps)
[ Info: Total time per image: 0.0063 seconds (159.36 fps)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].