https://github.com/bryceag11/quan

Quaternion Approximate Networks for Enhanced Image Classification and Object Detection

https://github.com/bryceag11/quan

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.1%) to scientific vocabulary

Keywords

object-detection oriented-bounding-box quaternion quaternion-neural-networks robotic-perception
Last synced: 6 months ago · JSON representation

Repository

Quaternion Approximate Networks for Enhanced Image Classification and Object Detection

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Topics
object-detection oriented-bounding-box quaternion quaternion-neural-networks robotic-perception
Created over 1 year ago · Last pushed 10 months ago
Metadata Files
Readme

README.md

QUAN: Quaternion Approximation Networks

Please visit our newest repo

A modular, configurable deep learning framework for training and evaluating quaternion neural networks on image classification and object detection datasets. This framework supports both standard convolutional neural networks and quaternion neural networks.

figure2_poincare_visualization

Project Structure

QuatNet_OBB/ ├── config/ │ ├── default.yaml │ ├── default_detection.yaml │ └── experiments/ ├── models/ │ ├── registry.py │ ├── blocks/ │ │ ├── blocks.py │ │ ├── neck.py │ │ ├── head.py │ │ └── qblocks.py │ ├── architectures/ │ │ └── blocks.py ├── utils/ │ ├── config.py │ ├── data.py │ ├── metrics.py │ ├── checkpoint.py ├── experiments/ ├── losses/ │ └── loss.py └── train.py

Installation

```bash

Clone the repository

git clone https://github.com/bryceag11/QuatNet_OBB.git cd cifar-training

Create a virtual environment

python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate

Install dependencies

pip install -r requirements.txt

```

Usage

Basic Training

```bash

Train with default configuration

python train.py

Train with a specific experiment configuration

python train.py --config config/experiments/qresnet34_custom.yaml

Resume training from the latest checkpoint

python train.py --config config/experiments/qresnet34_custom.yaml --resume ```

Creating a Custom Configuration

  1. Create a new YAML file in config/experiments/
  2. Modify the parameters as needed
  3. Run training with the new configuration

Example configuration:

```yaml

config/experiments/my_experiment.yaml

experiment: name: "MyExperiment" description: "Custom experiment configuration" seed: 42

dataset: name: "cifar10" batchsize: 128 augmentationsper_image: 2

model: type: "qresnet" name: "qresnet34" mapping_type: "poincare"

# Custom block specification blocks: - type: "conv" outchannels: 64 kernelsize: 3 # ... more blocks ... ```

Creating Custom Architectures

You can create custom architectures in two ways:

  1. Using Block Specification: Define the network structure using blocks in the YAML configuration
  2. Creating a New Architecture Class: Implement a new architecture in the models/architectures/ directory

Example: Custom Block Specification

```yaml model: type: "qresnet" name: "custommodel" blocks: # Initial convolution - type: "conv" outchannels: 64 kernel_size: 3

# Residual blocks
- type: "basic"
  out_channels: 128
  num_blocks: 3
  stride: 2

# Global pooling
- type: "global_pool"

# Flatten
- type: "flatten"

# Final classifier
- type: "fc"
  out_features: 10

```

Components

Quaternion Networks

This framework supports quaternion neural networks which represent each weight as a quaternion number with 4 components.

To enable quaternion operations, set the appropriate component types in your configuration:

yaml components: conv_type: "QConv2D" norm_type: "IQBN" activation_type: "QSiLU" pooling_type: "QuaternionAvgPool"

License

This project is licensed under the MIT License - see the LICENSE file for details.

Owner

  • Name: Bryce
  • Login: bryceag11
  • Kind: user
  • Location: Lexington, KY
  • Company: Lexmark International

ECE & Math @ UKY | Ex ShopStock Cloud HWE | Ex Lexmark SWE | Ex Honeywell Embedded SWE

GitHub Events

Total
  • Watch event: 1
  • Push event: 1
  • Fork event: 1
Last Year
  • Watch event: 1
  • Push event: 1
  • Fork event: 1

Dependencies

requirements.txt pypi
  • Pillow *
  • PyYAML *
  • matplotlib *
  • numpy *
  • opencv-python *
  • pandas *
  • requests *
  • scikit-learn *
  • seaborn *
  • shapely *
  • thop *
  • tqdm *