Skip to content

Latest commit

 

History

History

resnet50

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Resnet50

Input

Input

Ailia input shape : (1,3,224,224)
Range : [-127.0, 127.0]

Output

+ idx=0
  category=963[ pizza, pizza pie ]
  prob=0.8783312439918518
+ idx=1
  category=927[ trifle ]
  prob=0.04941209405660629
+ idx=2
  category=567[ frying pan, frypan, skillet ]
  prob=0.011235987767577171

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,

$ python3 resnet50.py

If you want to specify the input image, put the image path after the --input option.

$ python3 ??? --input IMAGE_PATH

By adding the --video option, you can input the video.
If you pass 0 as an argument to VIDEO_PATH, you can use the webcam input instead of the video file.

$ python3 resnet50.py --video VIDEO_PATH

You can select a model from resnet50.opt | resnet50 | resnet50_pytorch by adding --arch (default: resnet50.opt).

Reference

Deep Residual Learning for Image Recognition

Model Format

ONNX opset = 10

Framework

Chainer 6.3.0, Pytorch

Netron

resnet50.onnx.prototxt

resnet50.opt.onnx.prototxt

resnet50_pytorch.onnx.prototxt