HarmonyOS & Ascend

PetSnap · Cat & Dog Classification

PetSnap is a native HarmonyOS cat/dog classifier using MindSpore Lite: gallery or camera input, local MobileNetV2 CPU inference, and light / dark appearance.

From training to a native application

Model origins

The MindSpore / MobileNetV2 experiment freezes the backbone and fine-tunes a classification head on Kaggle Cats vs Dogs. Its training and conversion notes are maintained separately from the current HarmonyOS client.

Local inference

The app bundles an approximately 2 MB pet.ms model. Images are resized to 224×224 and run through the MindSpore Lite CPU path in FP32 without cloud classification.

Gallery and camera

Choose a gallery photo or take a picture to see a cat/dog result. ArkUI and HdsNavigation provide a native interface with light and dark appearance.

Scope and use

A binary classifier

The model distinguishes cats and dogs, not breeds. Below 70% confidence the interface labels an image as neither; this threshold does not reliably reject every other kind of object.

Development notes

Training follows a MindSpore / MobileNetV2 cat-and-dog classification experiment. The public repository provides the HarmonyOS client, preprocessing and model-loading code.

Back to projects