Skip to content

after training #961

Open
Open

Description

@jbarilo7911

Search before asking

  • I have searched the HUB issues and found no similar feature requests.

Description

we need the option to use optimize for example optimize=vela when exporting and perhaps some model pruning capabilities that can limit the model size for different edge devices, esp with tflite

Use case

No response

Additional

No response

Activity

  1. added
    embeddedPertaining to IOT or low-power devices
    exportsModel exports (ONNX, TensorRT, TFLite, etc.)
    on Dec 28, 2024
  2. UltralyticsAssistant commented on Dec 28, 2024

    @UltralyticsAssistant
    Member

    👋 Hello @jbarilo7911, thank you for raising an issue about Ultralytics HUB 🚀! It looks like you're suggesting the addition of export-related optimizations and model pruning capabilities, particularly for edge devices and formats like TFLite. This is a great suggestion and something we understand could be valuable for many users.

    If this is a feature request, we appreciate the idea and will take it into consideration for future developments. If there are any specific scenarios or requirements you'd like this feature to address, feel free to share more details!

    If this is a 🐛 Bug Report, please also include detailed steps to reproduce the issue to help us investigate.

    We aim to address all issues in a timely manner, and an Ultralytics engineer will review this soon. Thanks for your patience! 😊

  3. pderrenger commented on Dec 28, 2024

    @pderrenger
    Member

    @jbarilo7911 thank you for your suggestion and for taking the time to share your thoughts! 😊

    The features you're requesting—adding an optimize=vela option during export and incorporating model pruning capabilities—are excellent ideas, especially for improving deployment on resource-constrained edge devices. Here's some context and guidance:

    1. Optimize with Vela:
      Vela is a compiler specifically designed to optimize TensorFlow Lite models for Arm Ethos-U NPUs. While Vela isn't natively integrated into the current Ultralytics export workflow, you can follow a two-step process:

      • First, export your YOLO model to TFLite using the model.export(format='tflite') function.
      • Then, optimize the exported TFLite model using the Vela compiler. You can find more details on Vela in Arm's documentation.

      We'll forward your suggestion to the development team for consideration as part of future updates to simplify this process directly in the HUB.

    2. Model Pruning:
      While pruning isn't directly integrated into HUB yet, it's a well-known technique to reduce model size and improve inference speed, particularly for edge devices. For now, you can manually prune models using third-party libraries like TensorFlow Model Optimization Toolkit or PyTorch's pruning utilities before exporting to TFLite or other formats. For example:

      from torch.nn.utils import prune
      model = YOLO('path/to/best.pt')
      # Apply pruning
      model.model = prune.global_unstructured(
          parameters=model.model.parameters_to_prune,
          pruning_method=prune.L1Unstructured,
          amount=0.5,  # Prune 50% of parameters
      )
      # Export pruned model
      model.export(format='tflite')

      We'll also pass your request for built-in pruning support to the team, as this feature could be incredibly beneficial for edge deployments.

    If you're interested in learning more about the current export workflows or supported optimizations, feel free to check out the Export Documentation and Edge TPU guide.

    Thanks again for the valuable feedback—your input helps us refine and enhance HUB for everyone! Let us know if you have any additional questions or ideas. 🚀

  4. github-actions commented on Nov 23, 2025

    @github-actions

    👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

    For additional resources and information, please see the links below:

    Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

    Thank you for your contributions to YOLO 🚀 and Vision AI ⭐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleStale and schedule for closing soonembeddedPertaining to IOT or low-power devicesenhancementNew feature or requestexportsModel exports (ONNX, TensorRT, TFLite, etc.)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions