https://github.com/bryceag11/quan
Quaternion Approximate Networks for Enhanced Image Classification and Object Detection
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
Repository
Quaternion Approximate Networks for Enhanced Image Classification and Object Detection
Basic Info
- Host: GitHub
- Owner: bryceag11
- Language: Python
- Default Branch: main
- Homepage: https://github.com/bryceag11/QUAN
- Size: 17.9 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
QUAN: Quaternion Approximation Networks
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.
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
- Create a new YAML file in
config/experiments/ - Modify the parameters as needed
- 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:
- Using Block Specification: Define the network structure using blocks in the YAML configuration
- 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
- Repositories: 3
- Profile: https://github.com/bryceag11
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
- Pillow *
- PyYAML *
- matplotlib *
- numpy *
- opencv-python *
- pandas *
- requests *
- scikit-learn *
- seaborn *
- shapely *
- thop *
- tqdm *