Object Detection using Convolutional Neural Networks on Windows - windows

I'm looking into performing object detection (not just classification) using CNNs; I currently only have access to Windows platforms but can install Linux distributions if necessary. I would like to assess a number of existing techniques, but most available code is for Linux.
I am aware of the following:
Faster RCNN (CNTK, Caffe w/ Matlab)
R-CNN (Matlab with loads of
toolboxes)
R-FCN (Caffe w/ Matlab)
From what I can see, there are no TensorFlow implementations for Windows currently available. Am I missing anything, or do I just need to install Ubuntu if I want to try more?
EDIT: A windows version of YOLO can be found here: https://github.com/AlexeyAB/darknet

There is a Tensorflow implementation for Windows but honestly it's always 1-2 steps behind Linux.
One thing I would add to your list (which was not already mentioned) is MaskRCNN
You can also look for some implementation of it for Tensorflow like this one: https://github.com/CharlesShang/FastMaskRCNN

Related

Is py_trees library of python which is used for creating behavior trees only used in ROS or can it be run on some other platform as well?

I have come across a library called py_trees which provides me with the classes and functions to create a behavior tree , but I am using windows 10 and I am wondering if ROS(which operates on Ubuntu) is required to use py_trees.
I have gone through the github pages of py_trees and in most of them it has been integrated with ROS and therefore I am wondering if we can use it in windows or not.
No, ROS is not required for py_trees; but it is useful with ROS. There is actually a separate package that specifically integrates it with ROS. It’ll work fine on Windows and can be installed via pip.

Can the Windows fork of Caffe be used for object detection?

I've installed Caffe on my Windows computer but from what I can tell online most projects that use Caffe to do object detection are using some other forks of Caffe like NvCaffe or the SSD fork. None of these forks are available for Windows.
Does this mean it's not possible to do object detection on the Windows fork or is it just that people prefer not to. Sorry if this is a dumb question but I find the Caffe documentation somewhat lacking when it comes to explaining what features require what fork. I'm using the python interface if that makes any difference.
Thanks for any clarifications!
It is possible to run Caffe-SSD on Windows, but some effort is needed. You need to merge the changes from the Windows branch into the Caffe-SSD. There are some existing solutions for that (https://github.com/runhang/caffe-ssd-windows, https://github.com/gustavkkk/caffe-ssd-win, google for more), but I did not use those, unfortunately. Colleague of mine did it by himself, so it is definitely possible. As soon as you get it compiled and running, you will have a Python interface as well.

Raspberry Pi Embedded application

I am developing a computer vision system to control orientation of two mirrors to track stimuli in field of view.We are sending coordinates to motor over network and trying to track as smoothly as possible.
I have two questions regarding this :
1.Is Python suitable for this kind of project . I have already coded it in Python and find it very easy to use.
I am running Raspbian on raspberry Pi but found that it's not a real time os. We are sending command every 20 ms to the server built on raspberry Pi. Should I switch to arduino or patch the Linux kernel for this application.
Python, combined with OpenCV, is one of the best candidates for this task.
As mentioned in the comment above, the "real-time" issue is OS related. I personally recommend an Arduino-based solution, even though that puts more burden on the hardware design. You could also check the new IoT solutions from Intel, they have a wide range of boards.

OpenCL distribution

I'm currently developing an OpenCL-application for a very heterogeneous set of computers (using JavaCL to be specific). In order to maximize performance I want to use a GPU if it's available otherwise I want to fall back to the CPU and use SIMD-instructions. My plan is to implement the OpenCL-code using vector-types because my understanding is that this allows CPUs to vectorize the instructions and use SIMD-instructions.
My question however is regarding which OpenCL-implementation to use. E.g. if the computer has a Nvidia GPU I assume it's best to use Nvidia's library but if no GPU is available I want to use Intel's library to use the SIMD-instructions.
How do I achieve this? Is this handled automatically or do I have to include all libraries and implement some logic to pick the right one? It feels like this is a problem that more people than I are facing.
Update
After testing the different OpenCL-drivers this is my experience so far:
Intel: crashed the JVM when JavaCL tried to call it. After a restart it didn't crash the JVM but it also didn't return any usable
devices (I was using an Intel I7-CPU). When I compiled the
OpenCL-code offline it seemed to be able to do some
auto-vectorization so Intel's compiler seems quite nice.
Nvidia: Refused to install their WHQL-drivers because it claimed I didn't have Nvidia-card (that computer has a Geforce GT 330M). When
I tried it on a different computer I managed to get all the way to
create a kernel but at the first execution it crashed the drivers
(the screen flickered for a while and Windows 7 said it had to
restart the drivers). The second execution caused a bluee-screen of
death.
AMD/ATI: Refused to install 32-bit SDK (I tried that since I will be using a 32-bit JVM) but 64-bit SDK worked well. This is the only
driver which I've managed to execute the code on (after a restart
because at first it gave a cryptic error-message when compiling).
However it doesn't seem to be able to do any implicit vectorization
and since I don't have any ATI GPU I didn't get any performance
increase compared to the Java-implementation. If I use vector-types I
might see some improvements though.
TL;DR None of the drivers seem ready for commercial use. I'm probably better of creating JNI-module with C-code compiled to use SSE-instructions.
First try to understand hosts & devices: http://www.streamcomputing.eu/blog/2011-07-14/basic-concept-hosts-and-devices/
Basically you can just do exactly what you described: check if a certain driver is available and if not, try the next one. What you choose first depends completely on your own preference. I would pick the device I have tested my kernel best on. In JavaCL you can pick the fastest device with JavaCL.createBestContext and CLPlatform.getBestDevice, check the host-code here: http://ochafik.com/blog/?p=501
Know NVidia does not support CPUs via their driver; only AMD and Intel do. Also is targeting multiple devices (say 2 GPUs and a CPU) a bit more difficult.
There is no API providing what you want. however, you can do the following:
i suggest you iterate over clGetPlatformIDs and query for the number of devices (clGetDeviceIDs), and device type for each device;
and pick the platform which has both types.
then build a map in u'r code, that maps for each type the list of platforms supporting it, ordered in some manner.
finally, just get the first item in the list corresponding for CL_DEVICE_TYPE_CPU and the first item corresponding for CL_DEVICE_TYPE_GPU.
if both returned results are equal (platform_cpu == platform_gpu) then pick one of them and use it for both.
if there is a platform supporting both, you will get match as before since you got order lists. then u can also do load balancing if u like on a single platform, like what Intel has.
Sorry for being late to the party, but regarding Intel's implementation behaviour under JavaCL, I'm afraid you've been bitten by a JavaCL bug :
https://github.com/ochafik/nativelibs4java/issues/297
Fixed in JavaCL 1.0.0-RC2 !
Cheers

Haskell or Ocaml with OpenGL and SDL precompiled distribution for Windows

I want to learn Ocaml or Haskell and I want to do it by writing a simple game. Apparently, there's one small problem: nobody cares about Windows and I want to do it on Windows, natively.
Haskell has Cabal, which has SDL, but it doesn't build due to a trivial problem with no workarounds (order of parameters passed to gcc). Ocaml doesn't even have that, it's all in source packages, be it GLCaml or OcamlSDL or whatever.
Is there a place where I can get a working SDL for Haskell or Ocaml on Windows without fighting with a dozen versions of compilers?
The Haskell Platform comes with a binding to OpenGL which should work out of the box on Windows.
Concerning the SDL package on hackage, you can use cabal unpack SDL to get the source code and fix things yourself. To install the package with your changes, run cabal install in the unpacked directory. In any case, drop a line to the maintainer, I'm sure he'll help out.
It's not related to SDL, but you've mentioned OpenGL. There is LablGL binding for OpenGL in OCaml which works out of the box. Wiki example (http://en.wikipedia.org/wiki/Objective_Caml#Triangle_.28graphics.29) compiles and works just fine.
The best instructions I've found for getting SDL to work in windows with a the most recent Haskell platform can be found at this blog. I followed everything step-by-step and it worked perfectly, despite some configure error messages.
It isn't SDL but GLFW works on Windows with Haskell through Cabal.
My article High-fidelity graphics with OpenGL 2 (25th Feb 2008) explained how the GLCaml bindings can be used to write OpenGL-based applications in OCaml that use vertex and fragment shaders (a phong shader is given as an example). There are 9 articles in the OCaml Journal on OpenGL, albeit mostly using the older LablGL library for OpenGL 1.1.
I tried and failed to get OpenGL working from Haskell under Linux in 2007. The Haskell Platform may have changed that but I have neither had time to try it yet myself nor ever heard of anyone using it for this.
However, both OCaml and Haskell must rely upon fragile low-level bindings to OpenGL because they are standalone languages and nobody has ever managed to get any significant commercial software using them to work. As you're on Windows, F#+XNA is a far more logical choice because XNA is tried and tested and F# has a safe high-level interface to it. A Google fight gives you a good idea of what a pioneer you'll be: +haskell +opengl gives 437 hits on Google and +ocaml +opengl gives only 347 hits.

Resources