datamllab / autovideo

AutoVideo: An Automated Video Action Recognition System
https://autoedge.ai/
MIT License
318 stars 36 forks source link

from autovideo import extract_frames is nor working #9

Open amitvermanit opened 2 years ago

amitvermanit commented 2 years ago

when i ran

"from autovideo import extract_frames"

I get following error

"ImportError: cannot import name 'extract_frames' from 'autovideo' (/Volumes/Disk-Data/pose estimation/autovideo-main/autovideo/init.py)"

daochenzha commented 2 years ago

@amitvermanit Hi, thanks for the feedback. This interface is deprecated. Currently it is wrapped as a pipeline primitive. See https://github.com/datamllab/autovideo/blob/main/autovideo/utils/d3m_utils.py#L125-L132

amitvermanit commented 2 years ago

After installing all the libraries. I ran python3 examples/fit.py

as suggested in the github link provided.

I got following error cInvalidPrimitiveCodeError: Method 'fit_multi_produce' has an argument 'produce_methods' with type 'collections.abc.Sequence[str]' and not an expected type: typing.Sequence[str]

Can you tell the autovideo version which I should install. I am using macbook. As you mentioned in the github link the code is only tested in linux, will it work in mac or not. Is there any other updated code. Please reply.

daochenzha commented 2 years ago

@amitvermanit Hi, thanks for the feedback. It should be able to work in Mac (at least for Python 3.6). Could you provide more details for me to reproduce the errors, like what Python version you are using, and which command you used to install (i.e., whether you used pip3 install autovideo or clone it and run pip3 instal -e .. Thanks!

amitvermanit commented 2 years ago

python version 3.9. I have installed with pip3 install autovideo. the error usually comes at the 'config' part.

daochenzha commented 2 years ago

@amitvermanit I have just tried Mac with Python 3.8.2, torch==1.9.0, torchvision==0.10.0. It seems to work well in my side when setting the number of workers for the torch data loading to 0 here https://github.com/datamllab/autovideo/blob/main/autovideo/recognition/tsn_primitive.py#L64 (two workers will cause some issues in pickle and we are looking into this) Could you try downgrading your python to see whether it works?

We didn't fully tested on Mac since most users will use Linux GPU servers. But thanks for the feedback. We will take more efforts to better support Mac system.

amitvermanit commented 2 years ago

I have tested with Python 3.8.2, torch==1.9.0, torchvision==0.10.0 as suggested. one of the issue I was able to understand is there is a folder named 'autovideo' which is conflicting with python package 'autovideo'. For example: when I ran "python3 examples/fit.py". I got following error "No module named 'autovideo.transformation'" (it pops inside 'pipeline = build_pipeline(config)' part.) It has to call the file 'transformation' inside autovideo folder but it is looking in the 'autovideo' python package library. Is there any suggestion how it can be resolved. In windows and linux, it might not be causing the issue.

daochenzha commented 2 years ago

@amitvermanit Thanks for the feedback. This is bug. This is because we didn't put a __init__.py under the transformation folder. I have just fixed it and uploaded to PyPI. Please try again.

amitvermanit commented 2 years ago

Thanks for the reply. As suggested I have installed the newer version of i.e. 1.2.2 with torch==1.9.0, torchvision==0.10.0. Now I have getting this error ModuleNotFoundError: No module named 'autovideo.augmentation.meta' I have seen that similar to previous code it should go to the folder 'autovideo'. Is the cause of this error is similar to previous one?

Screenshot 2022-04-01 at 3 06 00 PM
daochenzha commented 2 years ago

@amitvermanit Yes, this is a similar issue. I just fixed it. Please try again.

shaleenanuj commented 2 years ago

when i ran

"from autovideo import extract_frames"

I get following error

"ImportError: cannot import name 'extract_frames' from 'autovideo' (/Volumes/Disk-Data/pose estimation/autovideo-main/autovideo/init.py)"

I still get the error how to rectify it and make it run?

ruchiiii commented 1 year ago

I am also getting same error. How to run it?