Skip to content

hashtagml/optical

Repository files navigation

Optical

ci build codecov Python Version Documentation Status GitHub all releases PyPI - License PyPI version

logo

Optical aims to be the tool right next to your hand when you work on a computer vision project. Optical does not help you with training your deep learning models neither does it perform any fancy augmentation. It's rather about making life easier for you by automating all the routine tasks that you often go through before you can actually start training your model.



Where is optical useful?

Object detection is one of the mainstream computer vision tasks. However, when it comes to training an object detection model, there is a variety of formats that one has to deal with for different models e.g. COCO, PASCAL VOC, Yolo and so on. optical provides a simple interface to convert back and forth between these annotation formats and also perform a bunch of exploratory data analysis (EDA) on these datasets regardless of their source format.

At present we support the following formats 🚀:

Installation

optical is available in PyPi and can be installed with pip like so.

pip install --upgrade optical

For conversion to (or from) TFrecord, please install the tensorflow extra:

pip install optical[tensorflow]

for visualization of images in mediapy format, you need to have ffmpeg installed in your system.

Getting Started

See this quick started guide to get off the ground with optical.

Contributing

Work in local environment:

  1. Fork the repo

  2. install poetry:

    curl -sSL https://install.python-poetry.org | python3 -
  3. work on virtual environment:

    conda create -n optical python=3.8 pip
  4. install the dependencies and the project in editable mode

    poetry install
  5. Make your changes as required. Please use appropriate use of docstrings (we follow Google style docstring) and try to keep your code clean.

  6. Raise a pull request.

Work inside the dev container:

If you are a Visual Studio Code user, you may choose to develop inside a container. The benefit is the container comes with all necessary settings and dependencies configured. You will need Docker installed in your system. You also need to have the Remote - Containers extension enabled.

  1. Open the project in Visual Studio Code. in the status bar, select open in remote container.

It will perhaps take a few minutes the first time you build the container.