Metadata-Version: 2.1
Name: cfm-task-models
Version: 0.0.11
Summary: CFM - model zoo
Author: Alon Harell
Author-email: aharell@sfu.ca
Requires-Python: >=3.9.5,<=3.11
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Provides-Extra: extras
Requires-Dist: Pillow
Requires-Dist: cython (>=0,<1)
Requires-Dist: mmsegmentation (>=1.0.0,<1.2.2)
Requires-Dist: numpy
Requires-Dist: openmim
Requires-Dist: pytorch-msssim (==0.2.0)
Requires-Dist: scikit-learn
Requires-Dist: timm
Requires-Dist: torch (<2.0.0)
Requires-Dist: torchsummary (==1.5.1)
Requires-Dist: tqdm (==4.61.2)
Description-Content-Type: text/markdown

# CFM-Task-Models

Popular CV models modified for various approaches of Compression for Machines (aka Coding for Machines)

### Installation

The easiest way to install CFM-Task-Models is through PyPI, to do this simply use `pip install cfm-task-models`
However, CFM-Task-Models has requirements that currently cannot be handled by pip, thus before using CFM-Task-Models for the first time please run `miminstaller.py` in your virutal environment. If using poetry consider:
`poetry run -m cfm_task_models.split_utils.miminstaller`

###### Requirements

CFM-Task-Models currently relies on several tools from OpenMMLab, which require custom installation using the openmim installer. Openmim is a tool provided by OpenMMLab which installs their libraries based on the user's pytorch and cuda versions.

See pyproject.toml for standard requirements and miminstaller.py for OpenMMLAB requirements

### Usage

To test Swin_Transformer, run the following command from the root directory:

```python models/Swin-Transformer/models/swin_transformer_v2.py```


## Semantic Segmentation

To download the config and pretrained weights for swin-tiny-upernet-ade20k, run the following command from the root directory:

```mim download mmsegmentation --config swin-tiny-patch4-window7-in1k-pre_upernet_8xb2-160k_ade20k-512x512 --dest ./```


