datamllab / autovideo

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

examples/recogonize.py does not work out of the box. #14

Open danieltanfh95 opened 1 year ago

danieltanfh95 commented 1 year ago

Minimum size of dataset is 4, I have the following hack in produce_by_path that works.

# minimum size is 4
dataset = {
    'd3mIndex': [0,1,2,3],
    'video': [video_name,video_name,video_name,video_name],
    'label': [0,0,0,0]
}
akashlp27 commented 1 year ago

hey, even after trying this i'm getting the same error

danieltanfh95 commented 1 year ago

hey, even after trying this i'm getting the same error

what did you try? You need to hack the library code for this to work

danieltanfh95 commented 1 year ago

hey, even after trying this i'm getting the same error

refer to the changes here: https://github.com/datamllab/autovideo/compare/main...danieltanfh95:autovideo:main

knwachuk commented 1 year ago

AttributeError: 'PipelineRun' object has no attribute 'previous_pipeline_run_id'

System Configuration

Component Version
Python 3.8.2
OS macOS 11.6.5
autovideo 1.2.4

requirements.txt

autovideo
d3m
pandas
torch==1.9.0
torchvision==0.10.0

The restriction to version for torch and torchvision is from #13.

Run Command

Running the command below

python -m examples.recognize --load_path fitted_pipeline --video_path demo.avi

Error

produces the error:

Exception has occurred: AttributeError
'PipelineRun' object has no attribute 'previous_pipeline_run_id'
  File "/autovideo/autovideo/utils/axolotl_utils.py", line 80, in produce
    pipeline_result = backend.produce_pipeline(_id, [test_dataset])
  File "/autovideo/autovideo/utils/axolotl_utils.py", line 106, in produce_by_path
    predictions = produce(test_dataset=dataset,
  File "/autovideo/examples/recognize.py", line 49, in run
    predictions = produce_by_path(fitted_pipeline, args.video_path)
  File "/autovideo/examples/recognize.py", line 69, in <module>
    run(args)
AttributeError: 'PipelineRun' object has no attribute 'previous_pipeline_run_id'
VSSREEKANTH commented 1 month ago

the error is due to mismatch of data classes used for training(fitted_pipeline), and the inference data.