Learning Blocks
NanoVision
A very small detection model that finds the centre and label of each object.
Try it in StudioOn this page
What is this learning block?
NanoVision is the default model for Image projects. In the model list it appears as NanoVision MobileNetV2 0.35. It is designed to run on small, constrained devices.
What does it do?
NanoVision divides the image into a grid and decides, for every cell, whether it contains one of your objects (and which one) or just background. The result is the position (centre) and label of each object, not a box with an exact size.
Example: on a 96 × 96 image the grid is 6 × 6. A cell in the top-left that says apple means there is an apple there.
How does it learn?
- It starts from MobileNetV2, a network already trained on millions of everyday photos (ImageNet), so it already knows edges, shapes and textures.
- First it trains only the new detection layers for 15 training cycles.
- Then it fine-tunes the whole network with a smaller learning rate.
- Studio adds variety to your training images automatically (flips, small rotations, shifts, zoom, brightness and contrast changes).
- Training stops early if the validation results stop improving, and the best version is kept.
What model architecture does it use?
- 1Input imagee.g. 96 × 96 × 3
- 2MobileNetV2 (0.35)Pre-trained, cut at 1/16 resolution
- 31 × 1 convolution32 filters
- 41 × 1 convolutionOne output per label + background
- 5Output gride.g. 6 × 6 cells
The output grid is the image size divided by 16. With 3 labels and a 96 × 96 image, the output is 6 × 6 × 4 (3 labels plus background).
What settings can I configure?
| Setting | Default | What it does |
|---|---|---|
| Maximum training cycles | 60 | Upper limit of training cycles. Studio suggests a value between 60 and 100 based on your dataset size. |
| Learning rate | 0.001 | How big each learning step is. Lower it if the model overfits quickly. |
| Batch size | 32 | How many images are used for each learning step. |
| Training device | CPU | Choose GPU only if your PetalEdge server offers it. |
| Data augmentation | on (always) | Always on for NanoVision; you can't switch it off. |
Image size: at least 96 × 96, set in the Image block.
What problems can it solve?
- Counting objects (fruit, parts, people).
- Checking whether an object is present and roughly where.
- Tracking positions in a video.
It is not the right choice when you need the exact size of each object; use Vision Pro or EdgeDetect Lite instead.
Simple example
You label 3 kinds of screws in 150 photos and train with the defaults. In live classification, each screw shows up as a dot with its label. Two screws that lie in the same grid cell show up as one, so keep objects apart or use a larger image size.
How do I understand the training results?
The Evaluation page shows scores counted on grid cells (not including background cells):
- Precision (non-background): of the cells the model marked as an object, how many were right.
- Recall (non-background): of the cells that really contain an object, how many the model found.
- F1 Score (non-background): one number that combines precision and recall. This is the main score for NanoVision.
Studio also shows how often background images got a false detection. NanoVision does not report mAP, because it does not predict box sizes.