vkhoi / kth-action-recognition Goto Github PK
View Code? Open in Web Editor NEWAction Recognition on the KTH Dataset
License: MIT License
Action Recognition on the KTH Dataset
License: MIT License
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.
Please help me to resolve this error.
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 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
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
it's not issue but how i can use trained model to detect behavior with opencv ?
when you save the datasets, I think you can not guarantee the frames are always continue
currently, we can test list of videos and get average accuracy. I want to feed the single video file and get a result.
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'
the final accuracy obtained from the uploaded model?
My accuracy about block+flow is far from 90%
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: ''
Hi Khoi,
Simple question here, please direct me on how I can try out my models on a sample video to detect human activity.
Can you tell me how to run the cnn+of with a smaller training set so that my system doesnt crash
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.