# Image classification
The `image classification` is a Python-based sample applications that performs image classification using QNN for model inference.
`ResNet101` is a machine learning model that can classify images from the Imagenet dataset. It also serves as the basis for building more advanced models tailored to specific use cases.
Warning
Limitation: The sample image classification is non-functional due to deprecation of the AI model ResNet101Quantized at the time of release.
Note
For more information, see [sample_resnet101_quantized](https://github.com/qualcomm-qrb-ros/qrb_ros_samples/tree/main/ai_vision/sample_resnet101_quantized) GitHub repository.

## Pipeline flow for `image classification`
## ROS nodes used in the `image classification` pipeline
| ROS Node | Description |
| --- | --- |
| `qrb_ros_resnet101` | `qrb_ros_resnet101` is a python-based ROS2 Jazzy package that implements image classification. It uses QNN HTP as the model backend. The ROS node receives an image topic and publishes the classification result topic. |
| `image_publisher` | `image_publisher` is a ROS2 Jazzy package that publishes the image ROS topic with the local path. For more information, see [image_publisher](https://github.com/ros-perception/image_pipeline). |
## ROS topics used in the `image classification` pipeline
| ROS Topic | Type | Published By |
| --- | --- | --- |
| `/resnet101_quantized_results` | `sensor_msgs.msg.Image` | `qrb_ros_resnet101` |
| `/image_raw` | `sensor_msgs.msg.Image` | `image_publisher` |
## Prerequisites
You have completed the settings in [Set up the environment for running sample applications](https://docs.qualcomm.com/doc/80-70020-265/topic/quick_start.html#setup-demo-qs).
## Run Out-of-the-Box `image classification`
1. On the dev kit, run the following commands:
# Remount the /usr directory with read-write permissions
(ssh) mount -o remount rw /usr
# setup runtime environment
(ssh) source /usr/share/qirp-setup.sh -m
# Set the ROS_DOMAIN_ID
(ssh) export ROS_DOMAIN_ID=123
(ssh) ros2 launch sample_resnet101_quantized launch_with_image_publisher.py
Copy to clipboard
2. On the host, run the following commands:
1. Start a terminal and run the following command to check the image classification result.
(ssh) export ROS_DOMAIN_ID=123
(ssh) ros2 topic echo /resnet101_quantized_results
Copy to clipboard
2. Start the `rqt`.
# YOUR_HOST_IP is the IP address of the Host where you want to view the sample output.
(ssh) export DISPLAY=YOUR_HOST_IP:0
(ssh) export ROS_DOMAIN_ID=123
(ssh) rqt
Copy to clipboard
3. Select the following buttons in sequence.
Plugins --> Visualization --> Image View
4. Select topic `/image_raw` by manual on rqt console, then picture show on rqt successfully.
## Build and Run `image classification`
1. On the Host, run the following commands:
1. Build the sample application project.
cd /target/qcs6490-rb3gen2-vision-kit/qirpsdk_artifacts/qcs6490-rb3gen2-vision-kit
tar -zxvf qirp-sdk_2.3.0.tar.gz && cd qirp-sdk
source setup.sh
# build sample
cd /qirp-samples/ai_vision/sample_resnet101_quantized
colcon build
Copy to clipboard
2. Package and push the sample application to the device.
# package and push build result of sample
cd /qirp-samples/ai_vision/sample_resnet101_quantized/install/sample_resnet101_quantized
tar -czvf sample_resnet101_quantized.tar.gz lib share
scp sample_resnet101_quantized.tar.gz root@[ip-addr]:/opt/
Copy to clipboard
2. On the dev kit, run the following commands:
1. Install the sample package application.
# Remount the /usr directory with read-write permissions
(ssh) mount -o remount rw /usr
# Install sample package
(ssh) tar --no-same-owner -zxf /opt/sample_resnet101_quantized.tar.gz -C /usr/
Copy to clipboard
2. Run the sample application with the steps in [Run Out-of-the-Box image classification](https://docs.qualcomm.com/doc/80-70020-265/topic/demo2.html#run-resnet101q).
Last Published: Oct 10, 2025
[Previous Topic
Hand detection](https://docs.qualcomm.com/bundle/publicresource/80-70020-265/topics/hand_detection.md) [Next Topic
Run robotics sample applications](https://docs.qualcomm.com/bundle/publicresource/80-70020-265/topics/robotics_sample.md)