Live data from Hacker News

Welcome to the New AWS AI Blog

aws.amazon.com

61–70 of 98 posts

Re: Welcome to the New AWS AI Blog

#61
post #16
post #2

I am a complete noob to the AI space but I was wondering whether the following is possible (in AWS). I have a million scanned images of court documents. Some are briefs, some are motions, some are court orders, etc... Given that I have images and their types, could I "train" the AI with these million documents to recognize a new image that might come in?

AWS doesn't offer any high-level services for training your own custom model. You'd have to build the neural network yourself and deploy EC2 boxes to run it. I've had success with Clarifai's [0] custom CV model API in the past. You basically upload batches of labeled images to train a model, and then you can submit new images for classification. Of course, I have no idea how effective it would be for your documents.…

Wow, this is literally exactly what I was looking for. Thank you. Hopefully, it works well.

From https://developer.clarifai.com/quick-start/

Seems simple to train

  // add inputs with concepts
  app.inputs.create([{
    "url": "https://samples.clarifai.com/dog1.jpeg",
    "concepts": [
      { "id": "cat", "value": false },
      { "id": "dog", "value": true }
    ]
  }, {
    "url": "https://samples.clarifai.com/dog2.jpeg",
    "concepts": [
      { "id": "cat", "value": false },
      { "id": "dog", "value": true }
    ]

Then you predict what the another image is:

  // predict the contents of an image by passing in a url
  app.models.predict(Clarifai.GENERAL_MODEL,  
      'https://samples.clarifai.com/metro-north.jpg').then(
    function(response) {
      console.log(response);
    },
    function(err) {
      console.error(err);
    }
  );

Re: Welcome to the New AWS AI Blog

#62
post #51
post #47

Earlier quoted context omitted.

(Disclosure: I work on Google Cloud). Both providers offer you raw VMs with GPUs and such so you can run popular machine learning frameworks yourself by hand. After that the three providers diverge a bit, and I've not seen a good writeup myself. Roughly: - Google has both a hosted TensorFlow (Cloud ML) as well as specific, pre-trained models you can simply use (Cloud Vision, Cloud Speech, etc.). For an easy to use in…

GM for AI at AWS here: actually - we like TensorFlow quite a bit, too. We provide a machine image with TF, MXNet and others pre-installed, along with Keras, CPU and NVIDIA divers, and other libraries for deep learning. We just added Ubuntu support too: https://aws.amazon.com/blogs/ai/the-aws-deep-learning-ami-no...

Sorry if that wasn't clear from my opening (both providers offer the DIY option, and are happy to support every ML framework). I think for folks looking to have a hosted TF service though, we wouldn't expect that (sadly) from AWS, particularly after the MXnet announcement:

http://www.allthingsdistributed.com/2016/11/mxnet-default-fr...

but to each his own!

Re: Welcome to the New AWS AI Blog

#63

Earlier quoted context omitted.

i don't know, maybe different approaches could be combined. Maybe the layout provides a clue for some types of court documents? You could calculate the probability function of prediction a certain type right (or just use the outputs of the NN, that depends on the problem) as a confidence value and only do the OCR as a last resort. Disclaimer: pretty new to ML

That is exactly the approach I had in mind, except I would use the knowledge of the document type (as determined by AI) to guide OCR to specific sections of the page to get information from it. But I know next to nothing about AI and ML - that's why I was asking this question.

well, the problem is data. NN needs a lot (depending on the problem thousands or millions of samples). It will probably get very difficult to get this much data needed to train an ML algorithm the location of the relevant OCR text.

Often ML problems way more experimental than "normal" coding. I would first try modelling it as a classification-problem and just do some cross-entropy validation to check the performance of the model. If it's useful, go with it, if not back to the drawing board. You will need some serious computing power, so either buy some GPUs or use the cloud.

You could train a random forest based on the inputs of OCR and NN, if you want to get total ML. You would gain some interpretability (i don't know whether thats important, but i would guess it might)

I am sorry that I can't give you a more concrete answer, these are just ideas. They are probably wrong. Like i said, i am a beginner and also don't really know the problem.

Edit other idea: If you know the location of the relevant OCR-text, you could use the following approach: Use the NN for classification. It will return probability-like values for every category. Take the top 2 (or 3, or every top until they add up to 70 percent...idk). Then do some OCR for every category you have to check. If one is positive you have your result, if not run the others.

Re: Welcome to the New AWS AI Blog

#64

We have recently set up a TensorFlow assessment function in AWS lambda, and got very close to the maximum allowed size of a lambda function (250MB) with the trained model currently being 85MB, and the TensorFlow libraries and binaries taking up another 140 or so megabytes by default ( I feel like Amazon could do some work in this area to support users to use their own engines and not be bound to AWS AI Platforms and…

Just curious, is this way better than using Cloud ML? https://cloud.google.com/ml/

We're (sadly) a bit locked into using AWS. We've been eying the Google offerings for a while though (not just for this), so who knows what we may do in the future.

Re: Welcome to the New AWS AI Blog

#67

"Mark Cuban recently talked about it as the most important technology to ramp up on, to avoid becoming a “dinosaur”" I wonder if this impresses this blog's audience, or does exactly the opposite...

does cuban actively invest in A.I startups? wondering what makes him a quotable authority on the topic.

> wondering what makes him a quotable authority on the topic

His wealth.

The obsession with cyber-malthusianism among the owners of tech informs me more about their valuation of humanity than about the future of tech. Fortunately there's a more level headed analysis that was published by the NYT recently for those of us that aren't consciously or subconsciiously all-in about the idea of making Snow Crash non-fiction https://www.nytimes.com/2017/02/20/opinion/no-robots-arent-k...

Re: Welcome to the New AWS AI Blog

#68
post #51

Earlier quoted context omitted.

GM for AI at AWS here: actually - we like TensorFlow quite a bit, too. We provide a machine image with TF, MXNet and others pre-installed, along with Keras, CPU and NVIDIA divers, and other libraries for deep learning. We just added Ubuntu support too: https://aws.amazon.com/blogs/ai/the-aws-deep-learning-ami-no...

The challenge is always to get a lot of training data. Are there (artificial) datasets that can be used that showcase particular fit for deep learning? I think there is way to little research in building artificial datasets (using domain knowledge of course). It might even be possible to run these generative models and have this type of data very soon.

ImageNet, GoogleNet, etc. are all image datasets for precisely this purpose. There's also the recently announced YouTube dataset and Kaggle challenge [1] and Google Research's datasets [2].

I agree though, the kind of artificial / play-against-yourself datasets that the folks at DeepMind created for say Alpha Go are an entirely different beast.

[1] https://cloud.google.com/blog/big-data/2017/02/google-cloud-...

[2] https://research.google.com/research-outreach.html#/research...

Re: Welcome to the New AWS AI Blog

#69

Quick slightly unrelated question: Does anyone have a comparison of using Google cloud services vs AWS for machine learning? I'm planning to pick one, and I was leaning towards Google Cloud Services because of the TensorFlow support and the fact that Google is big on ML, making it likely that it's something that Google will support and be good at. With this blog post, I'm not sure.

[deleted]

Re: Welcome to the New AWS AI Blog

#70
post #49

We have recently set up a TensorFlow assessment function in AWS lambda, and got very close to the maximum allowed size of a lambda function (250MB) with the trained model currently being 85MB, and the TensorFlow libraries and binaries taking up another 140 or so megabytes by default ( I feel like Amazon could do some work in this area to support users to use their own engines and not be bound to AWS AI Platforms and…

The keep warm time isn't static AFAIK but some frameworks like Zappa have chosen 5 minutes (I work for AWS). If you raise an issue with support there may be other ways around this. There are also other reasons for not relying on functions being warm (spike in concurrent invocations, AZ outages, latency, etc.). If you open a support ticket and email me the # I'll see what I can find out: randhunt at amazon dot com I'm…

Hey, thanks for your reply.

Hadn't thought about a CloudWatch even to keep the function warm, I might suggest that to the team.

We haven't shrunk the model, we've deleted superfluous files from the TensorFlow python library and dependencies (we don't need tensorboard, for example).

It would be nice if you could package TensorFlow up into a minimal component just for assessment and not have any of the 'learning' stuff or other added-on libraries, but we couldn't find a simple way of doing that - we're not pro C++ engineers and even our python is not the greatest. We're managing for now, but if our model grows any bigger we will run into issues, but there have been some good suggestions in here.

We had considered the S3 store, but we ruled that out quite quickly for cost & performance at the number of invocations a months we're looking at - but that was before we knew more about the 'keeping warm', so that may be revisited, too.

Post reply on HN