# Activity Recognition TensorRT
Perform video classification using 3D ResNets trained on Kinetics-700 and Moments in Time dataset - accelerated with TensorRT 8.0
[![ActivityGIF](resources/act.gif)]
## TensorRT 8 Installation
Assuming you have CUDA already installed, go ahead and download TensorRT 8 from [here](https://developer.nvidia.com/tensorrt-getting-started).
Follow instructions of installing the system binaries and python package for tensorrt [here](https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing-tar).
## Python dependencies
Install the necessary python dependencies by running the following command -
```sh
pip3 install -r requirements.txt
```
## Clone the repository
This is a straightforward step, however, if you are new to git recommend glancing threw the steps.
First, install git
```sh
sudo apt install git
```
Next, clone the repository
## Download Pretrained Models
Download models from [google-drive](https://drive.google.com/drive/folders/1PumnUl_-eVvk0tFpn463vPxpqchGEuWB?usp=sharing) and place them in the current directory.
## Running the code
The code supports a number of command line arguments. Use help to see all supported arguments
```sh
➜ python3 action_recognition_tensorrt.py --help
usage: action_recognition_tensorrt.py [-h] [--stream STREAM] [--model MODEL] [--fp16] [--frameskip FRAMESKIP] [--save_output SAVE_OUTPUT]
Action Recognition using TensorRT 8
optional arguments:
-h, --help show this help message and exit
--stream STREAM Path to use video stream
--model MODEL Path to model to use
--fp16 To enable fp16 precision
--frameskip FRAMESKIP
Number of frames to skip
--save_output SAVE_OUTPUT
Save output as video
```
Run the script this way:
```sh
# Video
python3 action_recognition_tensorrt.py --stream /path/to/video --model resnet-18-kinetics-moments.onnx --fp16 --frameskip 2
# Webcam
python3 action_recognition_tensorrt.py --stream webcam --model resnet-18-kinetics-moments.onnx --fp16 --frameskip 2
```
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
TensorRT_使用TensorRT部署3D-Resnet视频分类算法_优质算法部署项目实战.zip (7个子文件)
TensorRT_使用TensorRT部署3D-Resnet视频分类算法_优质算法部署项目实战
resources
act.gif 5.19MB
action_recognition_kinetics_moments.txt 14KB
requirements.txt 239B
action_recognition_kinetics.txt 6KB
action_recognition_tensorrt.py 8KB
README.md 2KB
opts.py 712B
共 7 条
- 1
资源评论
JZSJ
- 粉丝: 2w+
- 资源: 1325
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功