
Using Golang on processing images and machine learning - hoangvukenshin
Hi All,
I&#x27;m building a server for mobile application. Server must using OpenCv for processing images and machine learning for searching or some task. So i&#x27;m consider use python or golang for server.
Can you suggest something for my choose.Thank you so much
======
theaustinseven
The short answer: It depends.

The long answer: It depends on what your biggest constraint is. If your
biggest constraint is server cost, then I would suggest C++. C++ has come a
long way in terms of web services, and if you are doing both image processing
and machine learning, then C++ will give you unparalleled performance and
access to libraries. However, if your primary constraint is developer hours,
then python is the way to go. You won't have the same explicit control, but
for OpenCV and Machine Learning, Python has excellent support and you will end
up having much more concise, readable code.

~~~
hoangvukenshin
Yes, i got it. Thanks

------
tmaly
I use Go to process images for my food project. I specifically use a library
with bindings to libvips

It runs on both osx and linux for me

[https://github.com/h2non/bimg](https://github.com/h2non/bimg)

There is also bindings for OpenCV here is one

[https://github.com/lazywei/go-opencv](https://github.com/lazywei/go-opencv)

~~~
hoangvukenshin
Because maybe i'll write some complex function. With C++ and OpenCV,it's very
faster and better. I extend use cgo for call c++ fuction. But i don't know
speed of it.

------
ankurdhama
It seems in your case all the heavy lifting will be done by libraries like
OpenCv and other ML libraries which are already very efficient. So the only
purpose of your server side language is to expose those capabilities to your
mobile application through HTTP/REST. If this is so then go ahead with python.

