aws-samples / aws-panorama-samples

This repository has samples that demonstrate various aspects of AWS Panorama device and the Panorama SDK
https://docs.aws.amazon.com/panorama/
MIT No Attribution
82 stars 59 forks source link

pose_estimation sample compile error #38

Closed jk1333 closed 2 years ago

jk1333 commented 2 years ago

Repro steps

  1. Create jupyter instance through provided CF template for running test utility

  2. Open pose_estimation sample and run first cell which contains 'import gluoncv'

  3. import fails because no installed related packages.

  4. pip install gluoncv mxnet (1.9.0)

  5. unable to locate 'libarmpl_lp64_mp.so' while import gluoncv again

  6. Install arm performance lib from https://developer.arm.com/tools-and-software/server-and-hpc/downloads/arm-performance-libraries and add lib path to ld_library_path

  7. model import fail on people_detection_model = gluoncv.model_zoo.get_model('yolo3_mobilenet1.0_coco', pretrained=True)

    message: MXNetError: MXNetError: Invalid Parameter format for layout expect int or None but value='', in operator Convolution(name="", stride="(2, 2)", no_bias="True", kernel="(3, 3)", layout="NCHW", num_group="1", dilate="(1, 1)", pad="(1, 1)", num_filter="32")

  8. downgrade mxnet==1.6.0 and import gluoncv again and fail with following message OSError: /usr/local/lib/python3.6/dist-packages/mxnet/libmxnet.so: cannot open shared object file:

But if I try this sample on sagemaker with conda_python3_mxnet kernel, it does not fail but eventually not run on testing stage (Probably arch mismatch)

shimomut commented 2 years ago

@jk1333 , We need to add an instruction to install MXNET and Gluoncv in the environment. Let me confirm the steps and update by tomorrow.

shimomut commented 2 years ago

@jk1333 ,

Here is the steps to install mxnet and gluoncv on the environment.

install:

$ mkdir install_mxnet
$ cd install_mxnet
$ sudo apt-get install -y libopencv-dev
$ wget https://archive.apache.org/dist/incubator/mxnet/1.8.0/apache-mxnet-src-1.8.0-incubating.tar.gz
$ tar xvzf apache-mxnet-src-1.8.0-incubating.tar.gz
$ cd apache-mxnet-src-1.8.0-incubating
$ make -j8
$ cd python
$ sudo python3 setup.py install
$ sudo pip3 install gluoncv

verify installation:

$ python3
>>> import gluoncv
>>> exit()

After confirming you can import gluoncv module within Python interactive shell, please confirm that Pose estimation sample runs correctly. It uses gluoncv module to export models from the model zoo.

We will incorporate this information in the sample or document soon. Thank you for your feedback.

jk1333 commented 2 years ago

@shimomut Thanks it works well! I'll try this on my appliance and share if there are problems.

shimomut commented 2 years ago

I added a Markdown in the pose estimation sample notebook, how to install these libraries. Closing this ticket.