Giter Club home page Giter Club logo

kth-action-recognition's People

Contributors

vkhoi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kth-action-recognition's Issues

can't open/read file: check file path/integrity

I have installed the latest OpenCV version-> 4.6.0.66 and Pytorch version->1.12.1.
I am getting the following error.

[ WARN:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp (239) cv::findDecoder imread_('..\dataset\walking\person25_walking_d4_uncomp.avi'): can't open/read file: check file path/integrity

Kindly find a screenshot of the error.

Screenshot 2022-09-02 081624

Please help me to resolve this error.

OSError: Could not load meta information === stderr ===

I can't make the dataset. The following exception is raised. Though I have updated imageio and ffmpeg plugins. Could you sense what else could be done?
~\Anaconda\envs\tensorflow_env\lib\site-packages\imageio_ffmpeg_io.py in read_frames(path, pix_fmt, bpp, input_params, output_params)
148 err2 = log_catcher.get_text(0.2)
149 fmt = "Could not load meta information\n=== stderr ===\n{}"
--> 150 raise IOError(fmt.format(err2))
151 elif "No such file or directory" in log_catcher.header:
152 raise IOError("{} not found! Wrong path?".format(path))

eval_cnn_block_frame_flow.py

eval_cnn_block_frame_flow.py 35
chkpt = torch.load(model_dir, map_location=lambda storage, loc: storage)

serialization.py 579 load
with _open_file_like(f, 'rb') as opened_file:

serialization.py 230 _open_file_like
return _open_file(name_or_buffer, mode)

serialization.py 211 init
super(_open_file, self).init(open(name, mode))

FileNotFoundError:
2
No such file or directory

KTH dataset with Keras

Hi,

This is not actually an issue.

I could successfully run datautils.py of the main folder and could generate pickle files corresponding to train, test and validation data for CNN block frame and CNN block frame flow.

I just wanted to know if i want to use keras to train my model how will i load the train,test and val data corresponding to flows if i want train my optical flows(temporal stream)

that is, after loading as below

train_set = BlockFrameFlowDataset(directory, "train")
dev_set = BlockFrameFlowDataset(directory, "dev")
train_set.zero_center(train_set.mean)
dev_set.zero_center(train_set.mean)

train_files, test_files, train_targets, test_targets = train_test_split(......) ??

Any help is highly appreciated.

Thank you

about save the data

when you save the datasets, I think you can not guarantee the frames are always continue

test with a single video file

currently, we can test list of videos and get average accuracy. I want to feed the single video file and get a result.

Runtime Error: Expected object of scalar type Long but got scalar type Byte for argument #2 'target'

Loading Dataset
Start training
Traceback (most recent call last):
File "train_cnn_single_frame.py", line 59, in
validate=True, resume=resume, use_cuda=cuda)
File "D:\Action Recognition\KTH Program\KTH-Action-Recognition-master\KTH-Action-Recognition-master\main\train_helper.py", line 109, in train
loss = criterion(outputs, labels)
File "C:\Users\Meghna\Anaconda\envs\tensorflow_env\lib\site-packages\torch\nn\modules\module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "C:\Users\Meghna\Anaconda\envs\tensorflow_env\lib\site-packages\torch\nn\modules\loss.py", line 904, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File "C:\Users\Meghna\Anaconda\envs\tensorflow_env\lib\site-packages\torch\nn\functional.py", line 1970, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "C:\Users\Meghna\Anaconda\envs\tensorflow_env\lib\site-packages\torch\nn\functional.py", line 1790, in nll_loss
ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: Expected object of scalar type Long but got scalar type Byte for argument #2 'target'

About accuracy

the final accuracy obtained from the uploaded model?
My accuracy about block+flow is far from 90%

Error

Hi,

When I run your code, there is no problem with data_utils.py and data_utils.py. But I can not run eval_cnn_block_frame_flow.py sucessfully.

Loading dataset
Loading model
Traceback (most recent call last):
File "eval_cnn_block_frame_flow.py", line 35, in
chkpt = torch.load(model_dir, map_location=lambda storage, loc: storage)
File "/home/yuanpeng/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 259, in load
f = open(f, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: ''

Test on a sample video

Hi Khoi,

Simple question here, please direct me on how I can try out my models on a sample video to detect human activity.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.