what is the typical size of pre-trained image classification model size - neural-network

I have a few general questions regarding using pre-trained image classification models in mobile.
How big is a typical pre-trained model?
If it is too big for mobile, what is the best strategy from there?
I checked out the documentation of DeepLearning for Java, anywhere to download pre-trained model?
Thanks in advance.

It's really task dependent. I mean..you can't just say given an unknown problem what is an arbitrary size of neural net.
In general, if you're doing vision expect to be hundreds of megs, but a lot of it comes down tot he activation sizes. I would advise just doing some benchmarking overall. You can't really just handwave that.
A lot of the pretrained models are for computer vision only. They are based on keras. You shouldn't "download" them yourself. No framework works like that.
We have a managed module for that in the model zoo you should use instead.

Related

Facial emotion recognition on cartoon images

I'm new to deep learning and I'm working on a project that involves working on cartoon images and recognizing the emotions of the cartoon characters, I tried the approach of transfer learning but on doing some research I realised that the ImageNet and InceptionV3 only work for human faces. What approach should I follow? The training set is limited of about 300 images and the test set has around 180 images. I'm still a beginner in this field and I thought this would be a good project to start with. Any suggestions/guidance will be much appreciated. Thank you .
If your data is very low you can use data augmentation.Take a look:
https://towardsdatascience.com/data-augmentation-for-deep-learning-4fe21d1a4eb9
and also:
https://machinelearningmastery.com/how-to-configure-image-data-augmentation-when-training-deep-learning-neural-networks/
If data augmentation did not help you, you must try another
algorithms.neural nets needs lots of data.If your Data is less your
network will overfitt.
you can use data augmentation. for data augmentation, you could use the imgaug package. here is the documentation of Imgaug package

loading and using a pre-trained neural network from any platform

I am building a code and trying to keep things as generic as possible. I have seen a number of tutorials and post but they are all platform specific (tensorflow\pytorch).
Is there a good way to load and use a previously trained neural network model in a manner that the code will be able to cope with both torch and tensorflow? Does it matter in which version of tensorflow\torch the network was built in? I want the code to be as generic as possible.
Also, do I need to know the structure of the original network or can I load it and use it without the notion of the structure?
I don't think it is possible to write a program that can load pre-trained models from both Torch and Tensorflow as they save in different formats.
You might want to look into the Open Neural Network Exchange Format (https://onnx.ai/) if you are creating the models yourself, this is an initiative backed by Amazon, Facebook, Microsoft, and others to create a portable file format for deep learning models.

A Simple Tool to Train and Test Neural Networks

I’m looking a simple tool to train and test neural networks for classification tasks. It need not be very sophisticated tool and I just want to train and test simple data sets such as given in the following web site.
http://www.stats.ox.ac.uk/pub/PRNN/
It's not a pre-made utility, but you could roll your own quite quickly using the Encog neural network framework (for both Java and .NET).
I've used it before and it was quite easy to get to grips with. The documentation is quite good, and if you need it, I've also found support on the forums to be good.
* UPDATE *
I just remembered that Encog does actually ship with a pre-made utility called Encog Workbench, which should do what you want.

consultation about ANN libraries

Firstly, I am a beginner in artificial neural networks and I need a special library for training the artificial neural networks, but I very confused in the selection of the library, and since I didn't have the experience I wanted to consult you.
I have read about three libraries:
FANN, Flood, and Neuro Fusion libraries.
So, what are you think about the easiest and Least problems library for using it with VC++.6?
I just started using FANN, and it seems to be very well documented, with great examples and fast.
It operates with floats/doubles/integers and implements the Cascade2 training method, which is really great if you are unsure about the architecture of your NN.
It is not as rich as Encog (didn't use it), but if FANN implements all the functionalities you need, I think you should go with it.
Edit: I just realized that Encog is only available for .NET C# (besides Java)

Neural Networks for Pattern Recognition

Hey guys, Am wondering if anybody can help me with a starting point for the design of a Neural Network system that can recognize visual patterns, e.g. checked, and strippes. I have knowledge of the theory, but little practical knowledge. And net searches are give me an information overload. Can anybody recommend a good book or tutorial that is more focus on the practical side.
Thank you!
Are you only trying to recognize patterns such as checkerboards and stripes? Do you have to use a neural network system?
Basically, you want to define a bunch of simple features on the board and use them as input to the learning system. It can often be easier to define a lot of binary features and feed them into a single-layer network (what can become essentially linear regression).
Look at how neural networks were used for learning to play backgammon (http://www.research.ibm.com/massive/tdl.html), as this will help give you a sense of the types of features that make learning with a neural network work well.
As suggested above, you probably want to reduce your image a set of features. A corner detector (perhaps the Harris method) could be used to determine features in the checkerboard pattern. Likewise, an edge detector (perhaps Canny) could be used in the stripes case. As mentioned above, the Hough transform is a good line detection method.
MATLAB's image processing toolbox contains these methods, so you might try those for rapid prototyping. OpenCV is an open-source computer vision library that also provides these tools (and many others).