11 ms·
Welcome to the New AWS AI Blog
- starik36 10y agoI 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?
- aerovistae 10y agoIs that possible with AI? Yes, almost trivially. Is that possible with AWS AI? > Finally, we provide AI engines, a collection of open-source, deep learning frameworks for academics and data scientists who want to build cutting edge, sophisticated intelligent systems, pre-installed configured on a convenient machine image. Which is to say anything that TensorFlow can do, AWS AI can do. So yes. But is it possible without implementing it yourself? It looks like Amazon Rekognition may be able to do what you're looking for, but I'm not certain. You'll have to research that one.
- starik36 10y ago> almost trivially If not AWS, how could I get started elsewhere? Every tutorial I've looked at deals with a CVS data file, not an image. Could you point me to a resource that has an example of how to train AI with image documents?
- cobookman 10y agohttps://cloud.google.com/products/machine-learning/ https://cloud.google.com/products/machine-learning/ Look at the text API which parses text from an image and gives you it's pixel location.
- allenz 10y agoYou would just use pixel values as inputs, see https://www.tensorflow.org/get_started/mnist/beginners https://www.tensorflow.org/get_started/mnist/beginners You can make it more performant by downsizing the documents, but obviously this is incredibly GPU-intensive to train. I second the suggestions to just use OCR.
- ranman 10y agoRekognition doesn't currently support OCR.
- bhaavan 10y agoPrincipally, yes. However, the approach may be more nuisanced than that. If I were you, I would first pick a character recognition engine (which might have already been well trained) to convert the image to text. Once the text is there, that might serve as a better feature to classify the content. Furthermore, I had recommend converting words in the text to word-embeddings/ vectors using a suitable Glove or Word2Vec dataset similar to your content. While there are many benefits of end-to-end training, I don't think it might be best suited for this case. This is because we already know that the only useful feature in the document is the text, and not the contours or textures. Theefore wasting neurons in your neural network to learn the wastefulness of this features is just waste of resources. Furthermore, you benefit from even a larger corpus of learned data, which the char recognition engine has been trained on.
- starik36 10y agoOCR is my current approach. I am not really happy with it. The quality of OCRing leaves much to be desired, probably due to the documents themselves being haphazardly handled by the court personnel. OCR itself is a pretty CPU intensive activity and takes a significant time to complete for many documents. Thus, I was looking for a more advanced approach.
- jononor 10y agoWhat do you want to recognize? OCR is a better understood problem than a general neural net, so I think it's likely easier to improve its quality that to superseded the quality with image-based recognition.
- starik36 10y agoIdeally, I would like to get all the information from the page. Phone numbers, who is suing whom, case caption, etc... With OCR, you get bits and pieces of information, but because I don't know what the type of the document is, it is difficult to determine where, structurally speaking, this information resides on a page. If I could use AI to determine the type of the doc, I would know the structure of the document and I could then use OCR to pinpoint specific information on the page. Most court documents are created from templates.
- cobookman 10y agoYep it's possible to do this with ml. I've dealt with some partners who've built solutions in this space. More than happy to chat with you
- skewart 10y agoAWS 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. Obviously it depends on how visually distinct the different types are. [0] https://www.clarifai.com https://www.clarifai.com
- starik36 10y agoWow, this is literally exactly what I was looking for. Thank you. Hopefully, it works well. From https://developer.clarifai.com/quick-start/ 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); } );
- IanCal 10y agoPeople keep recommending things and approaches, but I'm really not clear on what it is you're actually trying to solve, so most of the responses might not help. > 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? Do I understand this right: 1. You have lots of documents as images, and their type (brief, motion, court order) 2. You get a new document, as an image. 3. You want to assign a type to this new document. Is that right? What's your goal in terms of quality? A key way of thinking about this is: 1. What's the risk/cost if you mis-classify a document? 2. What's the risk/cost if you fail to classify a document? Are the documents typically very structurally different? Could I probably tell them apart without wearing glasses? Or are they largely the same, but with nuanced differences in the text?
- starik36 10y ago> Do I understand this right That is exactly right. As far as quality, if I classify the document wrong today (or fail to classify it), it's not that big of a deal to the system as a whole - but users will be "very" annoyed and have to correct it. > Are the documents typically very structurally different? Could I probably tell them apart without wearing glasses? Or are they largely the same, but with nuanced differences in the text? The documents are structurally reasonably different, but not "very" different. If a trained human looks at it, they would be able to tell them apart. There are exceptions, of course. For instance, if the attorney doesn't follow accepted convention, but those are rare.
- Jarwain 10y agoThere's probably a way to determine the document type based on the differing structures (would have to see it to be sure). Alternately, is it not possible for a user to specify what type the document is?
- moeadham 10y agoWe have a similar project we are working on, it might be interesting to collaborate based on your needs. Send me a message: contact - @ - omen.ai
- kriro 10y agoHow should I interpret their picture? Can I get an AMI with Keras preconfigured on a p2 instance? Because that would be pretty useful. I currently have a p2 instance (smallest possible one) that I spin up for training and the like.
- Rezo 10y agoYes, the AWS Deep Learning AMI comes with MXNet, TensorFlow, Caffe, Theano, Torch, and Keras installed and ready to use: https://aws.amazon.com/blogs/ai/the-aws-deep-learning-ami-now-with-ubuntu/ https://aws.amazon.com/blogs/ai/the-aws-deep-learning-ami-no...
- kriro 10y agoThanks, somehow never saw this. I guess this can replace the scripts from the "Practical Deep Learning" series for me then. I'll just use the vanilla Amazon Deep Learning AMI + a p2 instance :) Quick Heads up in case anyone wants to do the same. The only European region that supports p2 at the moment is Ireland (I tried Frankfurt at first).
- niklasrde 10y agoWe 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 (<- which we cracked down a bit, but that's quite a hack). 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 Services. This could be as simple as publicly documenting the time lambda's stay 'warm' for and retain data in /tmp persisting through multiple invocations or some other examples on how an AI workflow could be implemented with popular custom engines such as TensorFlow. Does anybody else have any experience in this regard?
- sandusk 10y agoI'm making over $7k a month working part time. I kept hearing other people tell me how much money they can make online so I decided to look into it. Well, it was all true and has totally changed my life. This is what I do... http://bit.ly/2atnA1a http://bit.ly/2atnA1a
- djhworld 10y agoWe get around this by using a dependency injection framework (e.g. Guice) and initialising the module statically, so it will only get called once when the JVM loads (i.e. when the Lambda 'warms up') and then inject the dependencies into anything that uses them For example in one Lambda function, we use Guice to get resources from S3.
- deanCommie 10y agoIt sounds like you're stretching to make the use case fit inside a Lambda. Have you considered extracting the assessment functionality into an SWF activity, invoked from your Lambda via StepFunctions?
- niklasrde 10y agoNo, we haven't looked at SWF at all - might do some reading up on that. We considered running it on EC2, but the economics just didn't work out for our needs (hundreds of parallel processed jobs with irregular spikes, <5s runtimes per invocation and some others)
- ge96 10y agoThe one time I actually want to subscribe/follow something there's no "Hey would you like to give me your email address?" popup... hmm
- kiliankoe 10y agoThe link to the RSS feed is right down at the bottom ;)
- ge96 10y agoI did see that, but that RSS feed (atom?) I don't think I've ever used that in my life. I'll Google and see what/how to use it. I see it everywhere though. edit: I did see that they have a podcast, nice, something to listen to while I walk 2 hours in the middle of the night.
- dankohn1 10y agoUghh, you're making me feel old. RSS is (was) an amazing system for tracking website updates over time. It lost out to Twitter and Facebook (which don't remotely replace the use case), though it is still what makes podcasts work. I highly recommend Inoreader as a great RSS reader.
- Kurtz79 10y agoGoogle shutting down their Reader didn't really help. https://en.wikipedia.org/wiki/Google_Reader https://en.wikipedia.org/wiki/Google_Reader
- ge96 10y agoThanks for the recommendation. I tried one, I am not quite sure how it works yet at least for that AWS one. One page was a full-article, another page was several articles in one, it was odd but thank you. Regarding Blogger back in like 2011 or so, I saw RSS feed all the time at the bottom (usually still do).
- campbelltown 10y agoDo we really need a Mark Cuban quote in there though.
- LAMike 10y agoDude he put radio on the Internet, show some respect. Plus, his doors open like this
- techdragon 10y agoI find it frustrating for all the power they want to give me... that some basic service design is lacking. Polly is a stand alone component but the reverse is closely bound up into Lex which is a conversational interface API. Amazon has internally built an engine I could ask to convert an audio file in S3 into a text content representative of the audio file... yet I can only use Lex to drive a conversation via text and audio. If AWS really want to give me the power of their AI tools. How about unbundling them?
- LeicaLatte 10y agoProduction ready AI services are few and far and but Polly is up there. I am currently using it in a workflow as part of a IVR front end. Seeing good results.
- mza 10y agoAwesome - email me if you need any help: matthew@amazon.com.
- neom 10y agoHas anyone used Rekognition? We're thinking about pumping traffic cam feeds into it in cities for vehicle counting but don't want to waste time if it's junk.
- dharma1 10y agoI've tried it, it's pretty good, gets expensive quick but you don't have to manage your own servers I guess. Plenty of options if you do want to do this on your own server too - hit me up if you want some help
- ranman 10y agoIf you want to email me I can connect you with the rekognition team: randhunt at Amazon dot com. You cannot currently count objects other than faces and bounding boxes for non face objects are not currently provided. For the time being existing solutions in the opencv/tensorflow/MXNet realm might provide more of the result you're looking for.
- neom 10y agoHi Randall, long time no chat! Hope you're doing well. Good to know, it's not really our core product mission right now, so we're not at the point of building something (like a tensorflow implementation). I figured it rekognition has what we needed out of the box we might just clip it on and see how it performs, but wouldn't bother if it's not there yet, I'd imagine over time it will improve. Thanks.
- mark_l_watson 10y agoVery impressive. I am working in a cognitive computing book, and I am going to add a chapter or appendix on Amazon AI. A little off topic, but even though I self-classify as a Google fan and very much enjoyed working there as a contractor, when a friend asked once which technology company impressed me more I said Amazon. A big win for Amazon is that so many companies already have huge data sets in S3. Having AI APIs 'close to' existing data makes it easier getting started.
- avoutthere 10y agoI want to know if any of the pictures from my trail camera include deer. It sounds like Rekognition might be the answer for this.
- dharma1 10y agoDoes your trail camera capture video or image sequence? You probably only need to analyse 1 frame every few seconds or less if you just want to get deer alerts. I would go with a DIY solution, since Rekognition will get expensive quick ($1/1000 images). If you did 1fps running continuously, you'd pay $87/day. Nearly any ML framework with an ImageNet pre-trained model will work. Accuracy will be better if augmented with more labeled deer images (ImageNet probably only has frontal poses) but should be alright straight out of the box. You could run the whole thing locally on a cheap android phone for free instead of AWS cloud pricing, 1fps will be fine with TensorFlow or MXNet on Android. Then just setup email alerts.
- kejaed 10y agoThere was a recent post on HN about getting a tensorflow model running on a raspberry pi to detect trains. The blog post describing the process was quite well done. I bet it would apply quite well to detecting deer. https://news.ycombinator.com/item?id=13603225 https://news.ycombinator.com/item?id=13603225 http://svds.com/tensorflow-image-recognition-raspberry-pi/ http://svds.com/tensorflow-image-recognition-raspberry-pi/
- jmngomes 10y ago"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...
- dominotw 10y agodoes cuban actively invest in A.I startups? wondering what makes him a quotable authority on the topic.
- itchyjunk 10y agoI followed the link to his interview where he says his 2 biggest investments are Netflix and amazon, maybe that why? TV personality known for investment -> he's invested in amazon -> claims amazon is one of the best tech company followed closely by google, facebook -> people will want to go with amazon ? just making guesses based on that interview article.
- kyledrake 10y ago> 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-killing-the-american-dream.html https://www.nytimes.com/2017/02/20/opinion/no-robots-arent-k...
- jey 10y agoIt's completely a typo. They meant Mark Suster, as can be seen by following the link.
- nielmalhotra 10y agoQuick 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.
- boulos 10y ago(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 interface, we have direct TensorFlow (and more) integration in Datalab. - AWS also has some pre-trained services (Rekognition, Polly, Lex) but for "obvious" reasons doesn't do hosted TensorFlow. Instead Amazon Machine Learning is a bit more like Azure's offering: "Put data in, wire up stuff in the console and hit go". If you're really interested in ML, my biased opinion is that you'll be using TensorFlow. And as you surmised, we're committed to making TensorFlow the "best" ML framework and making sure it runs well on Google Cloud. Like Kubernetes, we're not going to handicap it elsewhere, but having it managed and accelerated for you, is extremely convenient. [Edit for formatting. I also should have mentioned there will be lots of ML-related talks at NEXT in San Francisco in two weeks!].
- mza 10y agoGM 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-now-with-ubuntu/ https://aws.amazon.com/blogs/ai/the-aws-deep-learning-ami-no...
- MrQuincle 10y ago
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- saosebastiao 10y agoI know ML is the big cheese right now, but doesn't it seem like a bad use case for the cloud? Consider: 1) Training ML models does not require network access, which is one of the biggest competitive advantages of the cloud. 2) Training ML models is typically a batch process, which benefits minimally from the scale-on-demand model of the cloud. Since the cloud premium is a significant exchange for the value that it adds, I don't see this being a big win for cloud providers. I can't help but think that if I were making use of extensive machine learning with continuous training, I'd have it training models on a local bare metal cluster statically scaled to my application's demand with minimal network connectivity needs. And then ship the serialized trained models to the cloud. The potential cost difference is huge.
- btown 10y ago> does not require network access > benefits minimally from scale-on-demand Neither of these is true when dealing with terabytes of data (or more, if you're working with image/video corpora). Many AI/ML problems have stages that are trivially parallelizable - if you can divide your problem into iterations where a subgraph of nodes communicates internally, then sends/receives updates to other subgraphs, it's very similar to an iterative map-reduce algorithm, perfect for networked cloud systems. And as you're tuning your hyperparameters, you don't know what the performance characteristics are, and you will absolutely want to run experiments in parallel, until you find the right settings that you'll use in production. You'd need to invest in a LOT of redundant bare metal to have that capability. As Netflix puts it in this presentation, the key to effective machine learning is iterating often, and that means having a lot of parallelism to bring to bear. https://www.infoq.com/presentations/machine-learning-netflix-2014 https://www.infoq.com/presentations/machine-learning-netflix...
- saosebastiao 10y agoGood point. I've worked with lots of local exploratory machine learning (R or Spark on a single workstation), and lots of stable applications that use machine learning processes that are no longer fiddled with, but I've never witnessed the transition between the two.
- 10y ago