Skip to main content

Simple Image Heads and Layers

Project description

Simple Image Heads and Layers

PyPI python versions coverage

Simple implementations of image based deep learning model heads and layers.

pip install sihl to get started. Check out the examples.

Model architecture

Models have a backbone, an optional neck, and one or more heads.

The spatial dimensions of feature maps on level level are stride=2^level times smaller than the original image.

Example of an object detection model architecture similar to FCOS:

block-beta
  columns 7

  classDef title fill:#0000,stroke:#0000;

  block:level_group
    columns 1
    Level
    l7["7"] l6["6"] l5["5"] l4["4"] l3["3"] l2["2"] l1["1"] l0["0"]

    class Level,l7,l6,l5,l4,l3,l2,l1,l0 title
  end
  class level_group title

  block:stride_group
    columns 1
    Stride
    s7["128"] s6["64"] s5["32"] s4["16"] s3["8"] s2["4"] s1["2"] s0["1"]

    class Stride,s7,s6,s5,s4,s3,s2,s1,s0 title
  end
  class stride_group title


  block:input_group
    columns 1
    space:8
    image
  end
  class input_group title

  block:backbone_group:1
    columns 1
    Backbone
    space:2 C5 C4 C3 C2 C1 space
    class Backbone title
  end
  image --> C1
  block:neck_group:1
    columns 1
    Neck
    P7 P6 P5 P4 P3 space:3
    class Neck title
  end
  C5 --> P5
  C4 --> P4
  C3 --> P3
  block:head_group:1
    columns 1
    Head
    h7["shared head"] h6["shared head"] h5["shared head"] h4["shared head"] h3["shared head"] space:3
    class Head title
  end
  P7 --> h7
  P6 --> h6
  P5 --> h5
  P4 --> h4
  P3 --> h3

Development

We recommend using pipx to install poetry.

Run tests with: poetry run pytest tests/

If you have a local GPU, run tests with: poetry run python examples/[...].py.
See logs with poetry run tensorboard --logdir examples/logs/[...]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sihl-0.0.0.dev0.tar.gz (50.0 kB view hashes)

Uploaded Source

Built Distribution

sihl-0.0.0.dev0-py3-none-any.whl (82.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page