Feature Map Size Detection for Neural Network Memory Allocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing neural network models face inefficiencies in detecting image sizes of feature maps across network layers, hindering effective memory allocation and processing efficiency.

Innovation Solution

A method involving a computer device that obtains a pre-trained image processing model, processes input images, establishes a stack based on network layers, detects feature map sizes, and iteratively deletes layers to optimize memory usage, using modules like acquisition, establishing, processing, detection, and iteration modules.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If traditional methods are used to detect image sizes of feature maps in neural network models, then memory space can be reserved in advance, but the detection process is inefficient and time-consuming

Engineering Contradiction:
Improvetime for detecting image sizesVSAvoidefficiency of image size detection
Core Design Contradiction:
Loss of timeVSProductivity

Solution Approach 1:

The patent applies preliminary action by pre-calculating and storing the relationship between input image sizes and output feature map sizes in a lookup table before actual image processing. When an image size detection is needed, the system directly queries the pre-computed table rather than performing complex calculations in real-time, significantly reducing detection time while maintaining accuracy

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates a simplified copy of the neural network's size transformation logic in the form of a lookup table that mirrors the behavior of the actual network layers. This copy stores pre-computed size relationships without requiring the full computational overhead of the original network, enabling fast size detection through simple table queries

Inventive Principle:
Principle #26Copying

2Measurement precision

If all network layers are processed to detect feature map sizes, then complete size information is obtained, but memory usage and processing complexity increase

Engineering Contradiction:
Improveaccuracy of feature map size detectionVSAvoidmemory usage for size detection
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent extracts only the essential size transformation information from the neural network layers and stores it in a compact lookup table. Instead of processing and storing all intermediate feature maps, it extracts and stores only the size relationships, significantly reducing memory consumption while preserving the ability to accurately determine feature map sizes

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent performs preliminary computation of size relationships and stores them in advance in a lookup table. This pre-computation phase separates the heavy calculation work from the actual image processing, allowing the detection phase to use minimal memory by simply querying pre-stored size information rather than computing it on-the-fly

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12505661B2Method for detecting image sizes, computer device, and storage medium
Publication Date: 2025.12.23 HON HAI PRECISION INDUSTRY CO LTD
  • US12505661B2 patent drawing
  • US12505661B2 patent drawing
  • US12505661B2 patent drawing

AI summary

A method for detecting image sizes using a computer device is provided. In the method, the computer device obtains a pre-trained image processing model and an input image, establishes a stack according to a number of network layers of the pre-trained image processing model. Output feature maps are obtained by processing the input image using the pre-trained image processing model. Image sizes of the output feature maps are detected. The image sizes are written into the stack in sequence, and the network layers deleted iteratively in an order from large to small according to an execution sequence of the network layers of the pre-trained image processing model until the stack is full. By performing the method, output sizes of the input image can be obtained, and a detection efficiency of image sizes can be improved.