# 画像を分類する

モデルのパイプライン・コマンドを実行する前に、必ず必要となる [前提条件](https://docs.qualcomm.com/doc/80-70018-15BJ/topic/ai-hub-qualcomm-im-sdk.html#prerequisites) に従ってください。

分類コマンドを実行する前に、以下のコマンドをSSHで実行します。

export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1
    Copy to clipboard

## GoogLeNetQuantized

GoogLeNetは、Imagenetデータセットから画像を分類できる機械学習モデルです。特定のユース・ケース向けに、より複雑なモデルを構築するために使用することもできます。

AI Hubモデルは、[このGoogLeNetQuantizedの実装](https://github.com/pytorch/vision/blob/main/torchvision/models/googlenet.py) に基づいています。

- モデル： [googlenet_quantized.tflite](https://aihub.qualcomm.com/iot/models/googlenet_quantized)
- ラベル： [imagenet_labels.txt](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/labels/imagenet_labels.txt)

注釈

このモデルを推論に使用すると、分類ラベルが表示されないことがあります。

gst-launch-1.0 -e --gst-debug=2 \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! queue ! tee name=split \
    split. ! queue ! qtivcomposer name=mixer sink_1::position="<30, 30>" sink_1::dimensions="<640, 360>" ! queue ! waylandsink sync=true fullscreen=true \
    split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
    external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/etc/models/googlenet_quantized.tflite ! queue ! \
    qtimlvclassification threshold=51.0 results=5 module=mobilenet labels=/etc/labels/imagenet_labels.txt \
    extra-operation=softmax constants="Mobilenet,q-offsets=<53.0>,q-scales=<0.08174873143434525>;" ! video/x-raw,format=BGRA,width=640, height=360 ! queue ! mixer.
    Copy to clipboard

## Inception-V3-Quantized

InceptionNetV3は、Imagenetデータセットから画像を分類できる機械学習モデルです。特定のユース・ケース向けに、より複雑なモデルを構築するために使用することもできます。

このモデルは、Googleのオープン画像データセットのサンプルを使ってint8にトレーニング後量子化されます。

AI Hubモデルは、[このInception-v3-Quantizedの実装](https://github.com/pytorch/vision/blob/main/torchvision/models/inception.py) に基づいています。

- モデル： [inception_v3_quantized.tflite](https://aihub.qualcomm.com/iot/models/inception_v3_quantized)
- ラベル： [imagenet_labels.txt](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/labels/imagenet_labels.txt)

gst-launch-1.0 -e --gst-debug=2 \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! queue ! tee name=split \
    split. ! queue ! qtivcomposer name=mixer sink_1::position="<30, 30>" sink_1::dimensions="<640, 360>" ! queue ! waylandsink sync=true fullscreen=true \
    split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
    external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/etc/models/inception_v3_quantized.tflite ! queue ! \
    qtimlvclassification threshold=51.0 results=5 module=mobilenet labels=/etc/labels/imagenet_labels.txt \
    extra-operation=softmax constants="Inception,q-offsets=<33.0>,q-scales=<0.18740029633045197>;" ! video/x-raw,format=BGRA,width=640, height=360 ! queue ! mixer.
    Copy to clipboard

## MobileNet-v2-Quantized

MobileNetV2は、Imagenetデータセットから画像を分類できる機械学習モデルです。特定のユース・ケース向けに、より複雑なモデルを構築するために使用することもできます。

AI Hubモデルは、[このMobileNet-v2-Quantizedの実装](https://github.com/tonylins/pytorch-mobilenet-v2/tree/master) に基づいています。

- モデル： [mobilenet_v2_quantized.tflite](https://aihub.qualcomm.com/iot/models/mobilenet_v2_quantized)
- ラベル： [imagenet_labels.txt](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/labels/imagenet_labels.txt)

gst-launch-1.0 -e --gst-debug=2 \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! queue ! tee name=split \
    split. ! queue ! qtivcomposer name=mixer sink_1::position="<30, 30>" sink_1::dimensions="<640, 360>" ! queue ! waylandsink sync=true fullscreen=true \
    split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
    external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/etc/models/mobilenet_v2_quantized.tflite ! queue ! \
    qtimlvclassification threshold=51.0 results=5 module=mobilenet labels=/etc/labels/imagenet_labels.txt \
    extra-operation=softmax constants="Mobilenet,q-offsets=<69.0>,q-scales=<0.2386164367198944>;" ! video/x-raw,format=BGRA,width=640, height=360 ! queue ! mixer.
    Copy to clipboard

## MobileNet-v3-Large-Quantized

MobileNet-v3-Largeは、Imagenetデータセットから画像を分類できる機械学習モデルです。特定のユース・ケース向けに、より複雑なモデルを構築するために使用することもできます。

AI Hubモデルは、[このMobileNet-v3-Large-Quantizedの実装](https://github.com/pytorch/vision/blob/main/torchvision/models/mobilenetv3.py) に基づいています。

- モデル： [mobilenet_v3_large_quantized.tflite](https://aihub.qualcomm.com/iot/models/mobilenet_v3_large_quantized)
- ラベル： [imagenet_labels.txt](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/labels/imagenet_labels.txt)

gst-launch-1.0 -e --gst-debug=2 \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! queue ! tee name=split \
    split. ! queue ! qtivcomposer name=mixer sink_1::position="<30, 30>" sink_1::dimensions="<640, 360>" ! queue ! waylandsink sync=true fullscreen=true \
    split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
    external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/etc/models/mobilenet_v3_large_quantized.tflite ! queue ! \
    qtimlvclassification threshold=51.0 results=5 module=mobilenet labels=/etc/labels/imagenet_labels.txt \
    extra-operation=softmax constants="Mobilenet,q-offsets=<99.0>,q-scales=<0.18705224990844727>;" ! video/x-raw,format=BGRA,width=640, height=360 ! queue ! mixer.
    Copy to clipboard

## ResNet18-Quantized

ResNet18は、Imagenetデータセットから画像を分類できる機械学習モデルです。特定のユース・ケース向けに、より複雑なモデルを構築するために使用することもできます。

AI Hubモデルは、[このResNet18Quantizedの実装](https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py) に基づいています。

- モデル： [resnet18_quantized.tflite](https://aihub.qualcomm.com/iot/models/resnet18_quantized)
- ラベル： [imagenet_labels.txt](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/labels/imagenet_labels.txt)

gst-launch-1.0 -e --gst-debug=2 \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! queue ! tee name=split \
    split. ! queue ! qtivcomposer name=mixer sink_1::position="<30, 30>" sink_1::dimensions="<640, 360>" ! queue ! waylandsink sync=true fullscreen=true \
    split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
    external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/etc/models/resnet18_quantized.tflite ! queue ! \
    qtimlvclassification threshold=30.0 results=5 module=mobilenet labels=/etc/labels/imagenet_labels.txt \
    extra-operation=softmax constants="Resnetnet,q-offsets=<68.0>,q-scales=<0.14944985508918762>;" ! video/x-raw,format=BGRA,width=640, height=360 ! queue ! mixer.
    Copy to clipboard

## ResNet101-Quantized

ResNet101は、Imagenetデータセットから画像を分類できる機械学習モデルです。特定のユース・ケース向けに、より複雑なモデルを構築するために使用することもできます。

AI Hubモデルは、[このResNet101Quantizedの実装](https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py) に基づいています。

- モデル： [resnet101_quantized.tflite](https://aihub.qualcomm.com/iot/models/resnet101_quantized)
- ラベル： [imagenet_labels.txt](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/labels/imagenet_labels.txt)

gst-launch-1.0 -e --gst-debug=2 \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! queue ! tee name=split \
    split. ! queue ! qtivcomposer name=mixer sink_1::position="<30, 30>" sink_1::dimensions="<640, 360>" ! queue ! waylandsink sync=true fullscreen=true \
    split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
    external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/etc/models/resnet101_quantized.tflite ! queue ! \
    qtimlvclassification threshold=51.0 results=5 module=mobilenet labels=/etc/labels/imagenet_labels.txt \
    extra-operation=softmax constants="Resnet,q-offsets=<46.0>,q-scales=<0.2186901867389679 >;" ! video/x-raw,format=BGRA,width=640, height=360 ! queue ! mixer.
    Copy to clipboard

## ResNeXt50-Quantized

ResNeXt50は、Imagenetデータセットから画像を分類できる機械学習モデルです。特定のユース・ケース向けに、より複雑なモデルを構築するために使用することもできます。

AI Hubモデルは、[このResNeXt50Quantizedの実装](https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py) に基づいています。

- モデル： [resnext50_quantized.tflite](https://aihub.qualcomm.com/iot/models/resnext50_quantized)
- ラベル： [imagenet_labels.txt](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/labels/imagenet_labels.txt)

gst-launch-1.0 -e --gst-debug=2 \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! queue ! tee name=split \
    split. ! queue ! qtivcomposer name=mixer sink_1::position="<30, 30>" sink_1::dimensions="<640, 360>" ! queue ! waylandsink sync=true fullscreen=true \
    split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
    external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/etc/models/resnext50_quantized.tflite ! queue ! \
    qtimlvclassification threshold=35.0 results=5 module=mobilenet labels=/etc/labels/imagenet_labels.txt \
    extra-operation=softmax constants="Resnetnet,q-offsets=<30.0>,q-scales=<0.06314703077077866>;" ! video/x-raw,format=BGRA,width=640, height=360 ! queue ! mixer.
    Copy to clipboard

## ResNeXt101-Quantized

ResNeXt101は、Imagenetデータセットから画像を分類できる機械学習モデルです。特定のユース・ケース向けに、より複雑なモデルを構築するために使用することもできます。

AI Hubモデルは、[このResNeXt101Quantizedの実装](https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py) に基づいています。

- モデル： [resnext101_quantized.tflite](https://aihub.qualcomm.com/iot/models/resnext101_quantized)
- ラベル： [imagenet_labels.txt](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/labels/imagenet_labels.txt)

gst-launch-1.0 -e --gst-debug=2 \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! queue ! tee name=split \
    split. ! queue ! qtivcomposer name=mixer sink_1::position="<30, 30>" sink_1::dimensions="<640, 360>" ! queue ! waylandsink sync=true fullscreen=true \
    split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
    external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/etc/models/resnext101_quantized.tflite ! queue ! \
    qtimlvclassification threshold=35.0 results=5 module=mobilenet labels=/etc/labels/imagenet_labels.txt \
    extra-operation=softmax constants="Resnetnet,q-offsets=<37.0>,q-scales=<0.1848793774843216>;" ! video/x-raw,format=BGRA,width=640, height=360 ! queue ! mixer.
    Copy to clipboard

## Shufflenet-v2-Quantized

ShufflenetV2は、Imagenetデータセットから画像を分類できる機械学習モデルです。特定のユース・ケース向けに、より複雑なモデルを構築するために使用することもできます。

AI Hubモデルは、[このShufflenet-v2Quantizedの実装](https://github.com/pytorch/vision/blob/main/torchvision/models/shufflenetv2.py) に基づいています。

- モデル： [shufflenet_v2_quantized.tflite](https://aihub.qualcomm.com/iot/models/shufflenet_v2_quantized)
- ラベル： [imagenet_labels.txt](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/labels/imagenet_labels.txt)

注釈

このモデルを推論に使用すると、分類ラベルが表示されないことがあります。

gst-launch-1.0 -e --gst-debug=2 \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! queue ! tee name=split \
    split. ! queue ! qtivcomposer name=mixer sink_1::position="<30, 30>" sink_1::dimensions="<640, 360>" ! queue ! waylandsink sync=true fullscreen=true \
    split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
    external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/etc/models/shufflenet_v2_quantized.tflite ! queue ! \
    qtimlvclassification threshold=35.0 results=5 module=mobilenet labels=/etc/labels/imagenet_labels.txt \
    extra-operation=softmax constants="Resnetnet,q-offsets=<69.0>,q-scales=<0.14428946375846863>;" ! video/x-raw,format=BGRA,width=640, height=360 ! queue ! mixer.
    Copy to clipboard

## SqueezeNet-1\_1-Quantized

SqueezeNetは、Imagenetデータセットから画像を分類できる機械学習モデルです。特定のユース・ケース向けに、より複雑なモデルを構築するために使用することもできます。

AI Hubモデルは、[このSqueezeNet-1_1Quantizedの実装](https://github.com/pytorch/vision/blob/main/torchvision/models/squeezenet.py) に基づいています。

- モデル： [squeezenet1_1_quantized.tflite](https://aihub.qualcomm.com/iot/models/squeezenet1_1_quantized)
- ラベル： [imagenet_labels.txt](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/labels/imagenet_labels.txt)

注釈

このモデルを推論に使用すると、分類ラベルが表示されないことがあります。

gst-launch-1.0 -e --gst-debug=2 \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! queue ! tee name=split \
    split. ! queue ! qtivcomposer name=mixer sink_1::position="<30, 30>" sink_1::dimensions="<640, 360>" ! queue ! waylandsink sync=true fullscreen=true \
    split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
    external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/etc/models/squeezenet1_1_quantized.tflite ! queue ! \
    qtimlvclassification threshold=25.0 results=5 module=mobilenet labels=/etc/labels/imagenet_labels.txt \
    extra-operation=softmax constants="Resnetnet,q-offsets=<0.0>,q-scales=<0.16435524821281433>;" ! video/x-raw,format=BGRA,width=640, height=360 ! queue ! mixer.
    Copy to clipboard

## WideResNet50-Quantized

WideResNet50は、Imagenetデータセットから画像を分類できる機械学習モデルです。特定のユース・ケース向けに、より複雑なモデルを構築するために使用することもできます。

AI Hubモデルは、[このWideResNet50-Quantizedの実装](https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py) に基づいています。

- モデル： [wideresnet50_quantized.tflite](https://aihub.qualcomm.com/iot/models/wideresnet50_quantized)
- ラベル： [imagenet_labels.txt](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/labels/imagenet_labels.txt)

gst-launch-1.0 -e --gst-debug=2 \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! queue ! tee name=split \
    split. ! queue ! qtivcomposer name=mixer sink_1::position="<30, 30>" sink_1::dimensions="<640, 360>" ! queue ! waylandsink sync=true fullscreen=true \
    split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
    external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/etc/models/wideresnet50_quantized.tflite ! queue ! \
    qtimlvclassification threshold=35.0 results=5 module=mobilenet labels=/etc/labels/imagenet_labels.txt \
    extra-operation=softmax constants="Resnet,q-offsets=<44.0>,q-scales=<0.1439792960882187>;" ! video/x-raw,format=BGRA,width=640,height=360 ! queue ! mixer.
    Copy to clipboard

Last Published: Oct 15, 2025

[Previous Topic
GStreamer APIでAI Hubモデルとラベルを使用する](https://docs.qualcomm.com/bundle/publicresource/80-70018-15BJ/topics/ai-hub-qualcomm-im-sdk.md) [Next Topic
物体検出](https://docs.qualcomm.com/bundle/publicresource/80-70018-15BJ/topics/object-detection.md)