Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
after a long term of reading the theory behind neural networks I finally want to stark to do my own project in object recognition.
However I struggle to find a practical entry point. I want to use either C#,C++ or C however all new tutorials seem to involve newer languages such as python.
For starting I would especially like to reprogram the theory concepts of Yann LeCuns publications about object recognition.
Which programming language is recommended to use? And much more important: Which framework do I use? There seem to be docents of frameworks (AForge, Apache Mahout, OpenCV) and my theoretical knowledge seems to be too impractical to differentiate the usage of these.
I want to program a simple independent neural network application which should be easy trainable plus I don't want to reprogram classes such as neuron or layer in order to focus on the architecture for the beginning.
Thanks and sorry for the simple probably often ask question, however I just couldn't find anything matching.
Greetings
Nex
disclosure: i'm not an expert.
depends on what exactly you want to do.
if you want to build something from scratch, probably the easiest language to start prototyping is matlab/octave because it's high level and offers pretty fast matrix manipulations, nice math support (like numeric derivatives) and robust plotting to quickly verify your models. when you have your prototype, you can port to to c/c++ to make it faster, more space efficient, portable etc.
if you want to just use exiting tools/techniques and just play with parameters (preprocessing, feature selection etc) to find the best model for you, i would recommend start from R and caret package or python (don't remember the package name)
if you want to use NN in cluster on big data then i would try using existing frameworks like openCV (not sure if mahout provides NN)
Google just released their tensorflow framework.
Its perfect to start with and offers even for high skilled NN-architectures a lot of feautes. I highly recommend it for everyone.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I've been using OpenCV for quite a while now and was wondering if switching to MATLAB would be a good idea. As far as I know they are both the same with MATLAB built over underlying OpenCV libraries. OpenCV is open source which is a definite advantage and supported on more platforms.
I'm trying algorithms specific for Pupil Detection so I need the results to be really precise.
Does anyone know any advantages by way of speed or processing or inbuilt functions that MATLAB uses?
If you already know OpenCV then stick with OpenCV. Currently OpenCV is the most comprehensive open source library for computer vision and it has large user community. OpenCV has more functions for computer vision than Matlab. Many of its functions are implemented on GPU. The library is being continuously updated (an updated version is released approximately every 3 to 4 months). In general C++ OpenCV code runs faster than Matlab code (if it's not fast enough, you can make it faster by optimizing the source code).
Matlab is useful for rapid prototyping and Matlab code is very easy to debug. It has good documentation and support. However, as others have mentioned, Matlab is not open source, its licence is pretty pricey, and its programs are not portable. Matlab is an interpreted language and it negatively affects its performance. Performance matters a lot in computer vision, especially if you are doing real time video processing. Its programs can be made fast too, however you will have to rely on high-level functions (i.e. built-in functions professionally written in C), mex functions (your own compiled C code), and you'll have to learn how to vectorize your code to achieve decent speed.
You haven't mentioned how you are using OpenCV so I am going to assume that you are using C++; in case you are using Python, please read this page..
If you are planning to use GPU for processing, then I would suggest you stick to C++.. Of course, there are loads of other optimizations you can do to your code..
For MATLAB, there are some fairly basic things that can be done as well..
At the end of the day, I would say that the closer you are to machine level language, the better your performance is going to be. But of course, using C can be a pain since there is a HIGH chance of writing unoptimized code and memory leaks. For this reason, C++ gives the best trade-off..
HTH
Your question does not really make sense.
OpenCV is a C++-library for carrying out computer vision tasks. Apart from C++, there is support for other programming languages via bindings.
MATLAB is a full scientific suite that consists of a massive IDE with its own language.
If you want your code to run in MATLAB, then you write MATLAB code. But then you will also need to install a 4GB IDE, and pay for a fairly expensive license.
My personal choice is to use OpenCV with the Python language bindings, as this gives me a nice scripting interface to do matrix operations (arguably somewhat more cluttered than MATLAB's) while still having easy access to OpenCV-functions.
If you really understand about opencv means definitly you never think about switching from opencv to matlab.
You can use opencv with python or cpp and even java etc., also.
Actually, you should not consider opencv only to complete your whole task.
Like opencv, other libraries also exists.
For example,
numpy -> for fast numeric calculation
matplotlib -> to show figure window etc., like matlab.
scipy -> for fast scientific calculation.
If you use your_programming_language + opencv + matplotlib + numpy + scipy definitly you will wonder about opencv.
And, don't worry about how to mingle these libraries together. Just mention their name and do your actual coding. Thats all.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
This semester, I'm implementing a compressed-sensing algorithm as an iPhone app. To do this, I'll need some good matrix/linear algebra libraries. I'm a little new to both iOS and Python, and am looking for some help at evaluating my options.
I know the iPhone has the Accelerate framework, which includes vecLib, BLAS, and LAPACK, but I'm not familiar with their API's (and they seem fairly confusing).
I've played around with Python/numpy, and I really like how simple it is to use - if I have the choice, I'd prefer to use numpy over Accelerate.
I know it's possible to embed Python, but I have had little luck on my own. I tried to include Enthought's EPD.framework in an XCode project, but didn't get it to work after playing around for an hour or so. I would imagine that compiling numpy would be worse.
As another alternative, could I use Cython (http://cython.org/) to generate C files then call functions from that? I also attempted this, but ran into more issues with including a .so library and calling it. Is there any way to have Cython generate .c and .h files? Would said .c and .h files still depend on numpy?
I've read some stuff about PyInstaller and freeze.py. Could either of those help me here?
Are there any options besides Accelerate or Python+numpy? Is Python+numpy a good option, or will it be hard to compile/build? Is Cython a valid solution?
Thank you!
Take the time to learn the Accelerate commands. If your doing complex math, these are the functions you want to be using. They are much faster, infinitely more likely to continue to be supported and tuned to future hardware, and as well - they use less energy than naive solutions.
The new release of the Swift programming language with iOS 8 allows for high level Python/Matlab -like code to be written. Accordingly, a framework called swix has been developed that wraps the Accelerate (/BLAS/Lapack/etc) frameworks.
Code snippet that fully utilizes the Accelerate framework:
var N = 10
var x = ones(N) * pi
var y = ones(N) * phi
var result = (x+y+4)*x
This code will can be compiled for the iPhone/iOS. Full details on installation are covered in the swix documentation.
With the release of Swift, and its access to the Accelerate framework, there is little reason to go out of your way to get Python running. With the right frameworks, you can use Swift to write high-level, and performant, code for iOS with syntax similar to Python/numpy, and performance that will be significantly greater than running numpy on iOS.
As other people have already posted, there are various libraries that attempt to 'wrap' the Accelerate framework to provide high-performance with an accessible API. As an alternative to the swix library in another answer, I have had great success with the Upsurge framework. For the kinds of operations that you are probably going to use, Upsurge may have everything that you need.
It provides an easy and detailed interface to a variety of Accelerate functions; matrices, convolution, FFT, linear algebra, mathematics etc. It also supports a lot of these operations on its own custom tensor type. The big advantage that I found over swix when I was deciding between them, was that Upsurge didn't have a dependency on OpenCV and didn't require any bridging headers (it is written in pure swift) which made debugging easier for me.
That being said, they are both great frameworks and either one will cover your needs. I would have a look at both and see which one better fits your needs.
There are libraries to include Python on iOS. These libraries are Kivy and Beeware. These are libraries that have the entire app written in Python.
Kivy
does not have a native GUI -- the app looks "Kivy"
can not make native system API calls
this is a more mature project than Beeware
Beeware
has a native looking GUI
can call native system APIs
(a newer project; less mature)
For Kivy, look at kivy-ios and the GitHub project and for Beeware look at python-ios-template.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
I am doing my dissertation project on NP-Hard Problems: I am going to implement various algorithms for problems such as the partition, the subset sum, the knapsack, etc and then compare the results, the running time, etc. Also, I am going to see what happens with the algorithms when you modify the problem (how does the algorithm behave on the reduced problem, etc).
Now I picked this topic as my project because I am interested in theoretical computer science but I am also not sure if I want to go on as an academic/researcher or join a company/startup and this project has both a theoretical and a practical (actual coding) side.
My question is, which programming language should I use? Should I stick to what I feel more familiar with (Java and maybe Python), or should I go with the web languages (HTML, CSS, PHP, RoR, etc), having in mind that web development skills are on high demand nowadays?
EDIT: HTML and CSS would be obviously used just for the UI.
I want my project to be something that will impress in an interview (for either a job or a masters course) and I am not confident that "yet another project in Java" can do that. I understand that as long as the work on it is good and the result is satisfactory I should be ok but if, let's say, using Ruby can give me some points I am totally going with that. In the same time, I understand that deciding which language to use is part of the project so I am not willing to complicate things just to try and look cool.
Thanks in advance!
EDIT: In case this changes any of the answers, this is a undergrad. dissertation project, not a PhD one.
First of all this is a subjective question, not perfectly suitable for SO, but we forgive you :)
Contrary to popular opinion here (looking at the previous answers), if you're trying to solve NP-Hard problems, I would definitely not write the programs in C or C++. Mainly because dynamic programming methods tend to look like absolute dog poop when written in low-level languages. For example, here's someone's dynamic programming solution to the knapsack problem: http://www.joshuarobinson.net/docs/knapsack.html.
It's well-written and well-formed, but barely readable simply due to the sheer amount of malloc, memcpy, and free you need to do. Go with Java or Python, no question about it. You want people to actually read (and maybe even enjoy?) your dissertation, I would assume.
Don't write it in PHP or Ruby because those languages aren't particularly applicable to computer science theory. With that said, if you're applying for a web-dev job and you're trying to impress your future employees with a knapsack problem or dynamic programming NP-Hard solvers, it's like shooting a sparrow with a cannonball.
If your project's subject is impressive, no one will care what language it's in. Do it in the language you feel is appropriate for the task. Knowing how to make the appropriate language choice and defending that choice should be more impressive than "OMG I used RoR XSL ActionScript CSS!!!"
Also, how long do anticipate this project will take? If you go with a language that's flashy and trendy today, do you know it will still be cool and popular when this project wraps up? Just saying in another way, popularity is not the reason to choose the language for something like this.
if you can invest effort and time, then i recommend c/c++. it will be an impressive add-on skill.
My language of preference would be Python. You could use Django and, in my opinion, it would be very applicable to things that are being done in the industry (especially with startups). Plus, you can't beat Python when it comes to readability and speed of development.
I would have thought that Python would be doing too much clever stuff under the hood to really be able to measure relative performance accurately.
Wouldn't it be better to use a lower-level language like C? Employers would respect you more for that than using something because it's "cool".
The languages you know look fine to me. The old saw is that a CS PhD makes you unemployable anyway, so I wouldn't worry about it. :-)
The other ones you mentioned are mostly specialized web presentation languages. I'm not real sure how one even goes about implementing the knapsack problem using CSS...
Well, as much as this might look fine on the web page, it seems to me that Java would do a better job doing what you need.
PHP, HTML and CSS knowledge is good for job finding, but not applicable very much on the subject you picked.
Also, I noticed a bunch of answers, so I guess this is a question very much related to personal taste and opinion. Hm... You asked for it, anyways ;)
Since you're already familiar with Python, I'd recommend using it. You can use the popular scipy and numpy libraries for your project. You'll probably find something of use in them.
That would be the core, or backend part of your project. When this part is finished, you should think about polish and presentation. You don't want to have an impressive looking presentation with wrong calculations.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Now that Apple relaxed the restrictions on developer tools/programs, I wonder what tempts developers to other languages than Apple offers by default, Objective-C, which is quite fun to program with. What missing feautures makes you not to program with it but something else?
Lack of Objective-C expertise or a large/complex code base in another language would be among common reasons.
Cross-platform coding might well be another.
I haven't done any iPhone development yet, but generally speaking, here's a few reasons:
Cross-platform development
The other language suits your coding style better
The other language is a better tool for the job
You are comfortable in the other language and don't have the time / budget / motivation to learn Objective-C
Existing libraries / codebase
Specific tools you might want to use
Testing some concepts in Objective-C can sometimes be kind of tedious to set up. Sometimes you just want to see how a single method works or play around with an object's functionality to see how it works.
Setting up a new project is somewhat tedious, and it's not always feasible to incorporate the test code in to a new project.
In this case, I do one of two things:
Keep an empty project around specifically for testing things
Drop down to the Terminal and use irb (or PyObjC) to play with the objects in Ruby or Python.
In a nutshell, the thing that's missing is the ability to use Objective-C in an interpreted manner. You have to use another language (like Ruby or Python) to do this.
I recently wrote some networking code in Python, then had to translate it into Objective-C for use on the iPad. A typical line of clear Python would become five or ten lines of busy-work C. I just work faster in higher-level lanugages; the language puts up less resistance, requires fewer forms to be filled out.
I have ported a couple of tiny language interpreters (for my own use, not for App store distribution) to the iPhone. This allows me to write short snippets of code on the road, without having to carry my Mac, and run them locally. I don't know of any small Objective C interpreters, and the language is not really designed for interactive use.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have come upon another class where I need to find an idea for a project, and since my last posting on SO for a project idea was so successful, I've decided to ask here again.
I'm taking a class titled Computer Vision for Human-Computer Interaction, and we need to come up with a few ideas for a project that we will have about 2-4 weeks to complete. We have the option of working with 1 or 2 other people, although I will probably be going solo on mine.
In the class we've covered things like image formation, image features, segmentation, shape analysis, object tracking, motion calculation, and some applications. Our homework assignments have been completed in Matlab for convenience, although its not required for use in our project.
I have come up with few possibilities: tracking the motion of a golf club and ball in full swing and doing some analysis, or possibly using eigenface techniques to do some sort of facial recognition and matching.
I would enjoy building an application that I can put on the web for others to play around with, but most of all I want to complete a project that could be of good use to someone (whether for entertainment or more useful purposes).
So... any ideas? Thanks!
Its fun and challenging to go from static image processing to doing analysis in real-time. For example, analyze video from a webcam and have the user play a primitive video game by waving their hands.
Or, if you want to continue with your face recognition idea, try writing software to highlight famous faces in a running video in realtime.
Use google image search to gather training data and then see how well your software can do at identifying the president of the US in different settings , for example. Can you train all of the former presidential candidates and differentiate them all?
Also, look into using OpenCV for fast real time computer vision processing in C.
Take a look at these for examples:
http://en.wikipedia.org/wiki/Category:Applications_of_computer_vision
http://www.cs.ubc.ca/~lowe/vision.html
There are some funky projects in this ongoing course:
http://www.seas.upenn.edu/~cis581/