Skip to content

Latest commit

 

History

History

mivolo

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

MiVOLO: Multi-input Transformer for Age and Gender Estimation

input

input image

(from https://pixabay.com/ja/photos/%E5%BA%97-%E3%82%B9%E3%83%BC%E3%83%91%E3%83%BC%E3%83%9E%E3%83%BC%E3%82%B1%E3%83%83%E3%83%88-%E3%82%B9%E3%82%AB%E3%83%BC%E3%83%88-4527402/)


output

output_image


usage

Automatically downloads the onnx and prototxt files on the first run.
It is necessary to be connected to the Internet while downloading.

For the sample image,

$ python mivolo.py
(ex on CPU)  $ python3 mivolo.py -e 0
(ex on BLAS) $ python3 mivolo.py -e 1
(ex on GPU)  $ python3 mivolo.py -e 2

If you want to specify the input image, put the image path after the --input option.
You can use --savepath option to change the name of the output file to save.

$ python3 mivolo.py --input IMAGE_PATH --savepath SAVE_IMAGE_PATH
$ python3 mivolo.py -i IMAGE_PATH -s SAVE_IMAGE_PATH
(ex) $ python3 mivolo.py --input input.jpg --savepath output.png

By adding the --video option, you can input the video.

$ python3 mivolo.py --video VIDEO_PATH --savepath SAVE_VIDEO_PATH
$ python3 mivolo.py -v VIDEO_PATH -s SAVE_VIDEO_PATH
(ex) $ python3 mivolo.py --video input.mp4 --savepath output.mp4

Reference

MiVOLO: Multi-input Transformer for Age and Gender Estimation


Framework

Pytorch


Model Format

ONNX opset = 11


Netron

mivolo.onnx.prototxt
yolov8x_person_face.onnx.prototxt