Yolo 深圳
深セン
今すぐ参加
用語集

FLOPs

機械学習におけるFLOPsを理解しましょう!モデルの複雑さをどのように測定し、効率に影響を与え、ハードウェアの選択を支援するかを学びます。

FLOPs, or Floating Point Operations, is a standard metric used to measure the computational complexity of a machine learning model. It specifically counts the number of mathematical calculations—primarily additions and multiplications involving decimal numbers—that a neural network must perform to process a single input, such as an image or a sentence. In the world of deep learning, FLOPs serves as a theoretical yardstick for estimating how "heavy" or computationally expensive a model is. A higher FLOPs count generally suggests that a model is more complex and will require more processing power and energy to execute, whereas a lower count indicates a lightweight architecture designed for efficiency.

The Role of FLOPs in Model Selection

When developing artificial intelligence applications, engineers often face a trade-off between accuracy and speed. FLOPs acts as a hardware-independent proxy for inference latency, allowing developers to compare different architectures without needing to benchmark them on every possible device. This metric is essential for choosing the right model for specific deployment scenarios. For instance, a researcher running experiments on powerful cloud computing servers might prioritize accuracy over efficiency, utilizing models with high FLOPs. Conversely, an engineer building for edge AI devices must prioritize low FLOPs to ensure the application runs smoothly within strict power and thermal limits.

実際のアプリケーション

The practical implications of FLOPs are evident across various industries where computational resources are a critical factor.

  • Autonomous Drones: In fields like agricultural robotics, drones equipped with cameras analyze crop health in real-time. Because drone batteries are limited, every bit of power consumption matters. Engineers specifically select models with low FLOPs, such as the Nano variants of YOLO26, to minimize the drain on the onboard processor, thereby maximizing flight time and operational range.
  • Mobile Augmented Reality: Smartphone applications that use facial recognition for security or apply AR filters rely heavily on efficient processing. These apps must function without causing the device to overheat or lag. Developers use FLOPs estimates to select lightweight models that fit comfortably within the capabilities of mobile chipsets like the Snapdragon series or Apple's A-series chips.

FLOPs vs. FLOPS (Floating Point Operations Per Second)

It is important to distinguish between "FLOPs" (plural of FLOP) and "FLOPS" (all caps). While they look nearly identical, they measure different things. FLOPs (small 's') refers to the total quantity of operations required by a model—it is a static measure of complexity. FLOPS (capital 'S') stands for Floating Point Operations Per Second and measures the speed or performance capability of hardware, such as a GPU. You can think of FLOPs as the distance a car needs to travel (the work to be done), while FLOPS is the top speed of the car (the hardware's ability to do the work).

PythonによるFLOPSの測定

You can easily calculate the computational cost of an Ultralytics model using Python. This is particularly useful during the model optimization phase to ensure your neural network fits within your hardware budget. The following example demonstrates how to load a YOLO26 model and determine its FLOPs.

from ultralytics import YOLO
from ultralytics.utils.torch_utils import get_flops

# Load a lightweight YOLO26 model
model = YOLO("yolo26n.pt")

# Calculate and print the model's FLOPs (Billions of operations)
# This gives you a hardware-independent complexity metric
flops = get_flops(model)
print(f"Model FLOPs: {flops:.2f} Billion")

Reducing FLOPs for Efficiency

To make models more deployable, researchers use several techniques to reduce FLOPs without significantly sacrificing accuracy. Model pruning involves removing less important connections in the neural network, effectively thinning it out. Another technique is quantization, which reduces the precision of the numbers used in calculations (e.g., from 32-bit floating point to 8-bit integers). Tools available on the Ultralytics Platform help streamline these optimization processes, making it easier to deploy efficient models to targets like TensorRT or OpenVINO. By understanding and optimizing FLOPs, developers can build AI systems that are both powerful and sustainable.

Ultralytics コミュニティに参加する

AIの未来を共に切り開きましょう。グローバルなイノベーターと繋がり、協力し、成長を。

今すぐ参加