Feature pyramid network implementations for computer vision tasks
Project description
🦊 FE-Neck
Feature extraction neck modules for computer vision models.
- Github repository: https://github.com/vncntcmnn/feneck/
- Documentation: https://vncntcmnn.github.io/feneck/
Installation
# Clone the repository
git clone https://github.com/vncntcmnn/feneck.git
cd feneck
# Install dependencies (CPU version)
uv sync --extra cpu
# Or with CUDA support
uv sync --extra cu118 # CUDA 11.8
uv sync --extra cu124 # CUDA 12.4
Quick Start
import torch
from feneck import FPN, PAFPN, BiFPN
# Classic FPN
fpn = FPN(
in_channels=[256, 512, 1024, 2048],
in_strides=[4, 8, 16, 32],
out_channels=256
)
# Backbone features
features = [
torch.randn(1, 256, 64, 64), # stride 4
torch.randn(1, 512, 32, 32), # stride 8
torch.randn(1, 1024, 16, 16), # stride 16
torch.randn(1, 2048, 8, 8), # stride 32
]
# Forward pass
pyramid_features = fpn(features)
Available Necks
| Module | Description | Best For |
|---|---|---|
| FPN | Feature Pyramid Network | Standard multi-scale detection |
| PAFPN | Path Aggregation FPN | Enhanced feature fusion |
| BiFPN | Bidirectional FPN | Efficient multi-scale fusion |
| NASFPN | NAS-discovered FPN | Learned fusion patterns |
| SimpleFPN | FPN for transformers | Single-scale to multi-scale |
| CustomCSPPAN | CSP-PAN + transformer | Advanced aggregation |
| HRFPN | High-Resolution FPN | Multi-scale aggregation |
| LRFPN | Location-Refined FPN | Remote sensing detection |
| CARAFE | Content-Aware upsampling | Adaptive feature reassembly |
| DyHead | Dynamic Head | Post-FPN refinement |
| FeaturePyramidExtender | Preprocessing utility | Backbone adaptation |
See the documentation for detailed usage examples and API reference.
Development
Setup Development Environment
# Install with dev dependencies
make install
# Run pre-commit hooks
uv run pre-commit run -a
Running Tests
# Run tests
make test
# Run tests with coverage
make test-cov
Requirements
- Python >= 3.10
- PyTorch
License
Apache License 2.0
Repository initiated with fpgmaas/cookiecutter-uv.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
feneck-0.0.1.tar.gz
(162.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
feneck-0.0.1-py3-none-any.whl
(38.1 kB
view details)
File details
Details for the file feneck-0.0.1.tar.gz.
File metadata
- Download URL: feneck-0.0.1.tar.gz
- Upload date:
- Size: 162.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4834108618c86cee43d91b9dcd43626a5f5ce3f29879c6c1f30b4a4593637427
|
|
| MD5 |
5122bf9e833cc59a13e093147b586b02
|
|
| BLAKE2b-256 |
888b6bc28491ce4c239b99cd51162c560744701f976e4b94c630c9b84f9bf7b1
|
File details
Details for the file feneck-0.0.1-py3-none-any.whl.
File metadata
- Download URL: feneck-0.0.1-py3-none-any.whl
- Upload date:
- Size: 38.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fba02c7f15f629fb0de476ef0f2351687f802fda89921139a2b6ecb755634980
|
|
| MD5 |
617606e8ab53568ed7dfde178184d855
|
|
| BLAKE2b-256 |
525614c933afe9ec776e0425226ac071922e97ad253b98b13260266cf636db1b
|