alexschultz / ReadToMe

Apache License 2.0
49 stars 14 forks source link

How can I use ReadToMe step by step? #4

Closed ghost closed 5 years ago

ghost commented 5 years ago

I have the following questions, please tell me the answer.

  1. Which files should I deploy to DeepLens?
  2. Do I need to install anything extra? My DeepLens does not currently have anything installed.
  3. Can you directly distribute the Lambda folder that was updated 8 days ago to Lamda?
  4. Is the model attached to S3 named tar.gz?
  5. Will I use "import mo fail" in the folder that you updated 8 days ago, have you encountered it?
alexschultz commented 5 years ago

I'll plan to have updated instructions this week to clarify how to deploy the project.

To answer your questions,

  1. from your development environment, within the lambda folder and running on linux, you need to pip install the dependencies from the requirements.txt file. Then you can use the script (package-lambda.py) to package everything up. The resulting zip file is what needs to get uploaded to the lambda in AWS.
  2. On the DeepLens, you will need to install tesseract-ocr using apt-get install.
  3. no, see step 1
  4. you are correct, the model is the tar.gz file in S3
  5. Not sure what you mean here. I updated the code so it should work with the latest changes to the 2019 edition of DeepLens.

Note: there is currently a problem with playing audio files on DeepLens. I am working on a fix for it but as of right now you will not be able to play the audio when the text is read and you will get an exception. As soon as I come up with a fix, I will update the code in this repo.

ghost commented 5 years ago

Thank you for your answer,But I still encountered some errors, as described below:

  1. Can I execute from a Linux system instead of a Windows system? Since I executed "package-lambda.py" on the windows system and then generated the "lambda-package.zip" file, should I upload it to Lambda?
  2. Is the execution language python 2.7 and readToMe.greengrass_infinite_infer_run ? 3.When I upload "lambda-package.zip" to Lambda, I get the following error. Do you have any idea? https://imgur.com/pqcipLU https://imgur.com/QkOwnTg https://imgur.com/a21Lt4s
alexschultz commented 5 years ago

You need to pip install the dependencies on Linux. The reason is that some of the dependencies are OS specific, and because DeepLens runs Ubuntu, you need the dependencies which are compiled for Linux. The package script just bundles everything up and flattens the lambda structure out. That is a Lambda specific requirement, not just for DeepLens. You won't be able to run this code from the Lambda console in AWS. It will only run correctly through greengrass on the deeplens device. The mo package is pip installed globally on the DeepLens.

ghost commented 5 years ago

Thank you very much for your reply. So... I need install module mo on DeepLens right? Could you tell me how to use pip to install mo ?