View Source Scidata.Caltech101 (Scidata v0.1.11)

Module for downloading the Caltech101 dataset.

Link to this section Summary

Functions

Downloads the Caltech101 training dataset or fetches it locally.

Link to this section Functions

Downloads the Caltech101 training dataset or fetches it locally.

Returns a tuple of format:

{{images_binary, images_type, images_shape},
 {labels_binary, labels_type, labels_shape}}

If you want to one-hot encode the labels, you can:

labels_binary
|> Nx.from_binary(labels_type)
|> Nx.new_axis(-1)
|> Nx.equal(Nx.tensor(Enum.to_list(1..102)))

options

Options.

  • :base_url - Dataset base URL.

    Defaults to "https://s3.amazonaws.com/fast-ai-imageclas/"

  • :dataset_file - Dataset filename.

    Defaults to "caltech_101.tgz"

  • :cache_dir - Cache directory.

    Defaults to System.tmp_dir!()