Model or dataset
FluxML/Metalhead.jl avatar
FluxML/Metalhead.jl

Metalhead.jl: Flux's model zoo, and what its pretrained column actually means

Computer vision models for Flux

348 stars68 forksJuliaNOASSERTION

At a glance

What is it?
Metalhead.jl packages 25 vision architectures as pure Flux layers, but only six ship with weights. That split shapes who should adopt it and who should look at ONNX or PyTorch instead.
Who is it for?
Adopt Metalhead.jl if you are already writing Flux code in Julia and need a ResNet, VGG, SqueezeNet, WideResNet, ResNeXt or ViT with pretrained weights, or if you need the full architecture list as a starting point for training on your own data. Do not adopt it if you need a pretrained model outside that six-model set, or if your inference path is Python.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 77 days ago.
What is it written in?
Mainly Julia, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The gap Metalhead.jl fills for Julia users

If you work in Julia and want a convolutional network, the choice before Metalhead.jl was to write the architecture yourself in Flux or to call out to Python. Metalhead.jl removes that choice. The README describes it as providing "standard machine learning vision models for use with Flux.jl", and the models are built from pure Flux layers rather than wrapped foreign runtimes. That matters for a practical reason: a model defined in Flux layers is differentiable and trainable inside the same Julia process that loads your data, so fine-tuning does not require moving tensors across a language boundary. The package is aimed at Julia engineers who are already committed to Flux and want a known architecture rather than a novel one. It is not a serving framework, not a training loop, and not a dataset loader.

Twenty-five architectures, six with weights

The README's model table is the most important document in the repository, and the column people skim is the last one. Of the image classification entries, ResNet, ResNeXt, SqueezeNet, WideResNet, VGG and ViT are marked with a Y under Pre-trained. Everything else, including EfficientNet, EfficientNetv2, ConvNeXt, ConvMixer, DenseNet, MobileNetv1 through v3, MNASNet, the entire Inception family, GoogLeNet, AlexNet, Xception, gMLP, MLPMixer and ResMLP, is marked N. UNet, the single entry under Other Models, is also N. That is twenty-five constructors in total and six with downloadable weights. Read the table before you plan a project around a model name. A team that assumes EfficientNet comes pretrained will discover the opposite at the point where they try to load it, and the fix is a training run, not a configuration change.

How the layers are organised and why that is the point

Metalhead.jl is not only a list of top-level constructors. The README states that the architectures "make use of pure Flux layers" and that they "represent the best-practices for creating modules like residual blocks, inception blocks, etc. in Flux." It also exposes a Layers module described as providing "building blocks for more complex models". So the package has two audiences: people who call ResNet(50) and stop there, and people who read the source of the residual and inception blocks to learn how to compose the same structures in their own networks. The second use is the more durable one. Architectures age; the pattern of expressing a residual connection as a Chain with a skip is reusable. If you are new to Flux and want a worked example of a nontrivial model, the repository doubles as that reference.

Getting it running

Installation is a single line at the Julia package prompt. The README gives it as `]add Metalhead` inside the REPL's pkg mode, which is equivalent to `using Pkg; Pkg.add("Metalhead")` from a script. Model construction goes through the constructor names in the table: ResNet, ResNeXt, SqueezeNet, WideResNet, VGG, ViT, and the rest. The README points to a getting started guide at fluxml.ai/Metalhead.jl/dev/tutorials/quickstart/ for the full walkthrough, and the API documentation is linked per model from the table itself, for example the ResNet entry links to fluxml.ai/Metalhead.jl/dev/api/resnet/#Metalhead.ResNet. The repository also links a Hugging Face organisation page at huggingface.co/FluxML, which is where you would look for weight artefacts. One honest caveat: the README excerpt here does not show the exact keyword arguments for loading pretrained weights, so check the quickstart page or the per-model API page before writing load code. Do not guess the argument name.

Where this is the wrong tool

The pretrained column is the first limitation, but not the only one. The second is that the package covers image classification and one segmentation architecture, UNet, and nothing else in the README. There is no detection head, no instance segmentation, no keypoint model, no text or multimodal model. If your task is object detection, Metalhead.jl gives you a backbone at best and you write the rest. The third limitation is release cadence. The listed releases are v0.9.6 in January 2026, v0.9.5 in January 2025, and v0.9.4 in September 2024. That is roughly one release per year in the recent record, so a new architecture published upstream may take a while to appear here, and you should expect to implement it yourself from the paper if you need it now. None of this is a defect in the code; it is a statement about scope. A project that needs a pretrained detection model should not start here.

The real alternative, and the difference that matters

The obvious comparison is a Python stack built on PyTorch or TensorFlow, where torchvision and its equivalents ship far more pretrained checkpoints, including detection and segmentation weights, and where the surrounding ecosystem of data loading and serving tooling is deeper. The difference is not just model count. In the Python stack you typically load a checkpoint and run inference, treating the model as a fixed artefact. In Metalhead.jl the model is a Flux layer graph you can differentiate through, inspect, and modify in the same language as the rest of your pipeline. That is a genuine advantage if your work involves custom training objectives or if your data pipeline is already Julia. It is a disadvantage if you only need inference on a pretrained network, because you give up the larger checkpoint catalogue for a capability you will not use. A second option, for teams that want pretrained weights without committing to a Julia training stack, is to export an ONNX graph from elsewhere and run it from Julia through an ONNX runtime, keeping Metalhead.jl for any models you train yourself.

Maintenance, licence and the NOASSERTION flag

Two maintenance facts are visible in the repository metadata. The default branch is master, and the last push recorded is 2026-07-01, which is recent relative to the v0.9.6 release in January 2026, so the project is not dormant. Version numbers have stayed in the 0.9.x line across the three releases listed, which in Julia's semantic versioning convention means the package has not declared a 1.0 stability commitment; expect the possibility of breaking changes on minor bumps and pin your version in Project.toml if that matters. On licensing, the GitHub metadata reports NOASSERTION, meaning the automated classifier could not identify a standard licence, and the README excerpt contains no licence section. That is a real gap for anyone redistributing the package or shipping it inside a product. Do not treat the absence of a licence identifier as permission. Check the repository's LICENSE file directly, and if the terms are unclear, get advice from someone qualified rather than inferring from the Flux organisation's other projects.

Editorial conclusion

Adopt Metalhead.jl if you are already writing Flux code in Julia and need a ResNet, VGG, SqueezeNet, WideResNet, ResNeXt or ViT with pretrained weights, or if you need the full architecture list as a starting point for training on your own data. Do not adopt it if you need a pretrained model outside that six-model set, or if your inference path is Python. Verify two things before committing: that the specific constructor you plan to call appears with a Y in the pretrained column of the README table, and that the licence terms of the repository (flagged NOASSERTION on the GitHub metadata) are acceptable for your distribution, since the README itself states no licence terms.

Official sources

  1. FluxML/Metalhead.jl on GitHub
  2. Issues
  3. Project website
  4. README
  5. Releases
Community notes

Community notes