Flax Image Models (fiml
) is a collection of image models with pretrained weights.
pip install git+https://github.com/Ino-Ichan/flax-image-models
You can pull docker container for fiml. See here.
docker pull inoichan/fiml:latest
import jax
import fiml
rng = jax.random.PRNGKey(0)
rng, model, params = fiml.create_model(rng,
'convnext_tiny',
pretrained=True,
num_classes=100)
inp = np.random.rand(4, 256, 256, 3)
out = model.apply(
{"params": params},
inp,
deterministic=True,
)
print(out.shape)
# (4, 100)
This project is released under the Apach 2.0 License