Learn About Our Meetup

5000+ Members



Join our meetup, learn, connect, share, and get to know your Toronto AI community. 



Browse through the latest deep learning, ai, machine learning postings from Indeed for the GTA.



Are you looking to sponsor space, be a speaker, or volunteer, feel free to give us a shout.

[P] TensorFlow 2.0 Implementation of Yolo V3 Object Detection Network

[P] TensorFlow 2.0 Implementation of Yolo V3 Object Detection Network

Hey reddit r/ml, I am sharing my implementation of YoloV3 in TensorFlow 2.0 alpha

There is a lot of buzz around TensorFlow 2.0 with tons of blog posts and tutorial. But I haven’t found a complete example that uses all the latest features and best practices brought by TF2. This project is created with the goal of being clean, efficient and complete with zero legacy debts.

Some of the key features include:

  • Everything is Tensorflow 2.0, no more or import keras.backend as K
  • Pure functional model definition compatible with both Eager and Graph execution
  • Eager mode custom training loop with tf.GradientTape (very good for debugging)
  • Graph mode high performance training with
  • Training pipeline uses and TFRecord for optimal throughput
  • Input transformations are implemented using the @tf.function auto-graph feature
  • Almost all tensor manipulations are vectorized to squeeze out that last bit of efficiency
  • Works with GPU out of box (TF2’s GPU integration is miles ahead of PyTorch’s if gpu: x.cuda())
  • Fully integrated with absl-py. TensorFlow 2.0 is deprecating tf.flags and recommends abseil (great library, heavily used by Google)
  • I haven’t gotten chance to test multi-gpu or distributed setup, but they are supposedly very easy to do with TF2.0.

The YoloV3 implementation is mostly referenced from the origin paper, original darknet with inspirations from many existing code written in PyTorch, Keras and TF1 (I credited them at the end of the README). I tried to fixed all the inconsistency, incompleteness and minor errors existing in other repos here. The project works with both YoloV3 and YoloV3-Tiny and is compatible with pre-trained darknet weights.

Example of detection output:

Thumbs Up!

This project has been quite a great learning experience for me. After working with TF1 and then Keras and then PyTorch, coming back to TensorFlow 2.0 feels very refreshing and enjoyable. TF2 will definitely rise and shine in the coming months following the official GA release.

submitted by /u/zzh8829
[link] [comments]

Next Meetup




Plug yourself into AI and don't miss a beat


Toronto AI is a social and collaborative hub to unite AI innovators of Toronto and surrounding areas. We explore AI technologies in digital art and music, healthcare, marketing, fintech, vr, robotics and more. Toronto AI was founded by Dave MacDonald and Patrick O'Mara.