Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📤 Add export task (coreml and tflite) #174

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

ramonhollands
Copy link
Contributor

@ramonhollands ramonhollands commented Feb 20, 2025

This pull requests adds a new export task including the option to export coreml and tflite format.

Use:

python yolo/lazy.py task=export name=ExportCoreml model=v9-s task.format=coreml
python yolo/lazy.py task=export name=ExportTflite model=v9-s task.format=tflite

Next to this it adds the option to use the FastModelLoader again during inference.

python yolo/lazy.py task=inference name=TfliteInference device=cpu model=v9-s task.nms.min_confidence=0.1 task.fast_inference=tflite use_wandb=False task.data.source=demo/images/test.jpg

Tflite export depends on ai_edge_torch which requires Python3.10

Next steps would be to add quantization and auto install missing modules

@ramonhollands ramonhollands changed the title 📤 Add export task 📤 Add export task (coreml and tflite) Feb 20, 2025
@henrytsui000
Copy link
Member

Hi,
I notice a change in yolo.py, which converts enumerations to an explicit counter (idx). We have updated our forward function with two actions: shortcut (directly obtaining an output from a middle layer) and external (inputting the model with other external sources) tensors.

Can you check if it is still able to run in this modification?

Henry Tsui

@ramonhollands
Copy link
Contributor Author

Hi Henry,
I merged the latest Main branch inside the 'add-export-task' branch and can confirm it still works correctly.
Best regards,
Ramon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants