beckachuu / frequency

Research frequency properties in images (WIP)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Frequency Filter

Description

This project aims to study the intriguing characteristics of images when divided into high-frequency and low-frequency components.

Table of Contents

Getting started

Prerequisites

  • Python

Installation

git clone https://github.com/beckachuu/FrequencyFilter.git
cd FrequencyFilter
pip install -r requirements.txt

Note: You may optionally wish to create a Python Virtual Environment to prevent conflicts with your system's Python environment.

Data Preparation

Image:

Groundtruth data:

Input Configuration

General input required arguments are in config.ini.

Run analysis and experiments

Run

Generate images

  • Run analyze: separate high and low frequency components of input images
python analyze_freq.py
  • Run experiments: run a chosen experiment
python run_exp.py

Detect objects

  • Detect objects for experiment results
python detect.py
  • Plot detected bboxes for experiment results
python plot_exp_demo.py

Evaluate

  • Evaluate mean Average Precision (mAP) for experiment results
python eval.py

Extra

  • Experiment with kernel: analyze magnitude and phase of different types of kernels in Fourier domain
python kernel_exp.py

View Result

  • \output\{Your input folder name}\analyze\: analyze results
  • \output\{Your input folder name}\EXP_{#}\: experiments results
  • Detected images: open folder \detects\ inside each result folder

References

  • The code obtaining low and high frequency component is partially obtained from the repository of Wang et al.
@article{Wang2019HighFrequencyCH,
  title={High-Frequency Component Helps Explain the Generalization of Convolutional Neural Networks},
  author={Haohan Wang and Xindi Wu and Pengcheng Yin and Eric P. Xing},
  journal={2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2019},
  pages={8681-8691},
  url={https://api.semanticscholar.org/CorpusID:173188317}
}

This project welcomes contributions and suggestions.

About

Research frequency properties in images (WIP)


Languages

Language:Python 100.0%