{
  "id": 238602,
  "title": "🚀🚀🚀 NFNET_L0 Model Tops the Leaderboard Score 🚀🚀🚀",
  "url": "/competitions/seti-breakthrough-listen/discussion/238602",
  "author_name": "Praveen ",
  "post_date": "2021-05-12T18:35:02.575000",
  "votes": 6,
  "comment_count": 0,
  "views": 0,
  "content": "<h1>ECA-NFNet-L0</h1>\n<p>Pretrained model on ImageNet, this is a variant of the NFNet (Normalization Free) model family.</p>\n<h2>Model description :-</h2>\n<p>This model variant was slimmed down from the original F0 variant in the paper for improved runtime characteristics (throughput, memory use) in PyTorch, on a GPU accelerator. It utilizes Efficient Channel Attention (ECA) instead of Squeeze-Excitation. It also features SiLU activations instead of the usual GELU.<br>\nLike other models in the NF family, this model contains no normalization layers (batch, group, etc). The models make use of Weight Standardized convolutions with additional scaling values in lieu of normalization layers.</p>\n<h2>Intended uses &amp; limitations :-</h2>\n<p>You can use the raw model to classify images along the 1,000 ImageNet labels, but you can also change its head to fine-tune it on a downstream task (another classification task with different labels, image segmentation or object detection, to name a few).</p>\n<h2>Example :-</h2>\n<p>import PIL<br>\nimport timm<br>\nimport torch<br>\nmodel = timm.create_model(\"hf_hub:timm/eca_nfnet_l0\")<br>\nconfig = model.default_cfg<br>\nimg_size = config[\"test_input_size\"][-1] if \"test_input_size\" in config else config[\"input_size\"][-1]<br>\ntransform = timm.data.transforms_factory.transforms_imagenet_eval(<br>\n   img_size=img_size,<br>\n   interpolation=config[\"interpolation\"],<br>\n   mean=config[\"mean\"],<br>\n   std=config[\"std\"],<br>\n   crop_pct=config[\"crop_pct\"],<br>\n)<br>\nimg = PIL.Image.open(path_to_an_image)<br>\nimg = img.convert(\"RGB\")<br>\ninput_tensor = transform(cat_img)<br>\ninput_tensor = input_tensor.unsqueeze(0)<br>\nbatch size = 1<br>\nwith torch.no_grad():<br>\n   output = model(input_tensor)<br>\nprobs = output.squeeze(0).softmax(dim=0)</p>",
  "messages": [
    {
      "id": 1304623,
      "postDate": "2021-05-12T18:35:02.577Z",
      "content": "<h1>ECA-NFNet-L0</h1>\n<p>Pretrained model on ImageNet, this is a variant of the NFNet (Normalization Free) model family.</p>\n<h2>Model description :-</h2>\n<p>This model variant was slimmed down from the original F0 variant in the paper for improved runtime characteristics (throughput, memory use) in PyTorch, on a GPU accelerator. It utilizes Efficient Channel Attention (ECA) instead of Squeeze-Excitation. It also features SiLU activations instead of the usual GELU.<br>\nLike other models in the NF family, this model contains no normalization layers (batch, group, etc). The models make use of Weight Standardized convolutions with additional scaling values in lieu of normalization layers.</p>\n<h2>Intended uses &amp; limitations :-</h2>\n<p>You can use the raw model to classify images along the 1,000 ImageNet labels, but you can also change its head to fine-tune it on a downstream task (another classification task with different labels, image segmentation or object detection, to name a few).</p>\n<h2>Example :-</h2>\n<p>import PIL<br>\nimport timm<br>\nimport torch<br>\nmodel = timm.create_model(\"hf_hub:timm/eca_nfnet_l0\")<br>\nconfig = model.default_cfg<br>\nimg_size = config[\"test_input_size\"][-1] if \"test_input_size\" in config else config[\"input_size\"][-1]<br>\ntransform = timm.data.transforms_factory.transforms_imagenet_eval(<br>\n   img_size=img_size,<br>\n   interpolation=config[\"interpolation\"],<br>\n   mean=config[\"mean\"],<br>\n   std=config[\"std\"],<br>\n   crop_pct=config[\"crop_pct\"],<br>\n)<br>\nimg = PIL.Image.open(path_to_an_image)<br>\nimg = img.convert(\"RGB\")<br>\ninput_tensor = transform(cat_img)<br>\ninput_tensor = input_tensor.unsqueeze(0)<br>\nbatch size = 1<br>\nwith torch.no_grad():<br>\n   output = model(input_tensor)<br>\nprobs = output.squeeze(0).softmax(dim=0)</p>",
      "rawMarkdown": "\n# ECA-NFNet-L0\n\nPretrained model on ImageNet, this is a variant of the NFNet (Normalization Free) model family.\n\n\n## Model description :- \n\nThis model variant was slimmed down from the original F0 variant in the paper for improved runtime characteristics (throughput, memory use) in PyTorch, on a GPU accelerator. It utilizes Efficient Channel Attention (ECA) instead of Squeeze-Excitation. It also features SiLU activations instead of the usual GELU.\n\nLike other models in the NF family, this model contains no normalization layers (batch, group, etc). The models make use of Weight Standardized convolutions with additional scaling values in lieu of normalization layers.\n\n## Intended uses & limitations :-\n\nYou can use the raw model to classify images along the 1,000 ImageNet labels, but you can also change its head to fine-tune it on a downstream task (another classification task with different labels, image segmentation or object detection, to name a few).\n\n\n## Example :- \n\nimport PIL\nimport timm\nimport torch\n\nmodel = timm.create_model(\"hf_hub:timm/eca_nfnet_l0\")\n\nconfig = model.default_cfg\nimg_size = config[\"test_input_size\"][-1] if \"test_input_size\" in config else config[\"input_size\"][-1]\ntransform = timm.data.transforms_factory.transforms_imagenet_eval(\n    img_size=img_size,\n    interpolation=config[\"interpolation\"],\n    mean=config[\"mean\"],\n    std=config[\"std\"],\n    crop_pct=config[\"crop_pct\"],\n)\n\nimg = PIL.Image.open(path_to_an_image)\nimg = img.convert(\"RGB\")\ninput_tensor = transform(cat_img)\ninput_tensor = input_tensor.unsqueeze(0)\nbatch size = 1\nwith torch.no_grad():\n    output = model(input_tensor)\nprobs = output.squeeze(0).softmax(dim=0)\n",
      "votes": 6
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1304623": "\n# ECA-NFNet-L0\n\nPretrained model on ImageNet, this is a variant of the NFNet (Normalization Free) model family.\n\n\n## Model description :- \n\nThis model variant was slimmed down from the original F0 variant in the paper for improved runtime characteristics (throughput, memory use) in PyTorch, on a GPU accelerator. It utilizes Efficient Channel Attention (ECA) instead of Squeeze-Excitation. It also features SiLU activations instead of the usual GELU.\n\nLike other models in the NF family, this model contains no normalization layers (batch, group, etc). The models make use of Weight Standardized convolutions with additional scaling values in lieu of normalization layers.\n\n## Intended uses & limitations :-\n\nYou can use the raw model to classify images along the 1,000 ImageNet labels, but you can also change its head to fine-tune it on a downstream task (another classification task with different labels, image segmentation or object detection, to name a few).\n\n\n## Example :- \n\nimport PIL\nimport timm\nimport torch\n\nmodel = timm.create_model(\"hf_hub:timm/eca_nfnet_l0\")\n\nconfig = model.default_cfg\nimg_size = config[\"test_input_size\"][-1] if \"test_input_size\" in config else config[\"input_size\"][-1]\ntransform = timm.data.transforms_factory.transforms_imagenet_eval(\n    img_size=img_size,\n    interpolation=config[\"interpolation\"],\n    mean=config[\"mean\"],\n    std=config[\"std\"],\n    crop_pct=config[\"crop_pct\"],\n)\n\nimg = PIL.Image.open(path_to_an_image)\nimg = img.convert(\"RGB\")\ninput_tensor = transform(cat_img)\ninput_tensor = input_tensor.unsqueeze(0)\nbatch size = 1\nwith torch.no_grad():\n    output = model(input_tensor)\nprobs = output.squeeze(0).softmax(dim=0)\n"
  }
}