
Research
wget to Wipeout: Malicious Go Modules Fetch Destructive Payload
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
简体中文 | English
install by pypi
pip install paddlevideo==0.0.1
note: you may have difficulty in installing opencv-python,you can try:
pip install opencv-python==4.2.0.32 -i https://pypi.doubanio.com/simple
build own whl package and install
python3 setup.py bdist_wheel
pip3 install dist/paddlevideo-x.x.x-py3-none-any.whl
video_file='data/example.mp4'
, Use inference model that Paddle provides model_name='ppTSM'
from ppvideo import PaddleVideo
clas = PaddleVideo(model_name='ppTSM',use_gpu=False,use_tensorrt=False)
video_file='data/example.mp4.'
result=clas.predict(video_file)
print(result)
>>> result
[{'videoname': 'data/example.mp4', 'class_ids': [5], 'scores': [0.999963], 'label_names': ['archery']}]
ppvideo --model_name='ppTSM' --video_file='data/example.mp4'
>>> result
**********data/example.mp4**********
[{'videoname': 'data/example.mp4', 'class_ids': [5], 'scores': [0.999963], 'label_names': ['archery']}]
model_file
andparams_file
, you can assign this param. If using inference model based on Kinectics-400 provided by Paddle, set as default='ppTSM'.model_name
for downloading.model_name
for downloading.We provide two ways to use: 1. Python interative programming 2. Bash command line programming
help
informationppvideo -h
model_file
and parameters's pathparams_file
from ppvideo import PaddleVideo
clas = PaddleVideo(model_file='user-specified model path',
params_file='parmas path', use_gpu=False, use_tensorrt=False)
video_file = ''
result=clas.predict(video_file)
print(result)
ppvideo --model_file='user-specified model path' --params_file='parmas path' --video_file='video path'
model_name
. You may not assign model_file
, and the model you chosen will be download in BASE_INFERENCE_MODEL_DIR
,which will be saved in folder named by model_name
,avoiding overlay different inference model.from ppvideo import PaddleVideo
clas = PaddleVideo(model_name='ppTSM',use_gpu=False, use_tensorrt=False)
video_file = ''
result=clas.predict(video_file)
print(result)
ppvideo --model_name='ppTSM' --video_file='video path'
np.ndarray
which has been preprocessed --video_file=np.ndarray
.from ppvideo import PaddleVideo
clas = PaddleVideo(model_name='ppTSM',use_gpu=False, use_tensorrt=False)
video_file =np.ndarray
result=clas.predict(video_file)
ppvideo --model_name='ppTSM' --video_file=np.ndarray
video_file
as a folder path containing series of videos, also can assign top_k
.from ppvideo import PaddleVideo
clas = PaddleVideo(model_name='ppTSM',use_gpu=False, use_tensorrt=False,top_k=5)
video_file = '' # it can be video_file folder path which contains all of videos you want to predict.
result=clas.predict(video_file)
print(result)
paddleclas --model_name='ResNet50' --video_file='video path' --top_k=5
--label_name_path
as your own label_dict_file, format should be as(class_idclass_name<\n>).0 abseiling
1 air_drumming
2 answering_questions
3 applauding
4 applying_cream
5 archery
......
label_name_path
. Program will take data/k400/Kinetics-400_label_list.txt
as defaults. If you hope using your own training model, you can provide label_name_path
outputing 'label_name' and scores, otherwise no 'label_name' in output information.from ppvideo import PaddleVideo
clas = PaddleVideo(model_file= './inference.pdmodel',params_file = './inference.pdiparams',label_name_path='./data/k400/Kinetics-400_label_list.txt',use_gpu=False)
video_file = '' # it can be video_file folder path which contains all of videos you want to predict.
result=clas.predict(video_file)
print(result)
ppvideo --model_file= './inference.pdmodel' --params_file = './inference.pdiparams' --video_file='video path' --label_name_path='./data/k400/Kinetics-400_label_list.txt'
from ppvideo import PaddleVideo
clas = PaddleVideo(model_name='ppTSM',use_gpu=False)
video_file = '' # it can be video_file folder path which contains all of videos you want to predict.
result=clas.predict(video_file)
print(result)
ppvideo --model_name='ppTSM' --video_file='video path'
FAQs
Awesome Video toolkits based on PaddlePaddle
We found that paddlevideo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.