• Stars
    star
    120
  • Rank 295,983 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created about 10 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple way to generate beautiful html logs with embedded images for CV purposes.

visual-logging

A simple way to generate beautiful html logs with embedded images for CV purposes.

visual-logging piggy backs on logging module and allows you to use sick power of logging to debug your computer vision application on a whole new level.

Now you can add OpenCV images (well technically it's numpy arrays), PIL images and matplotlib graphs to your logs.

You can read about it in details in a great blog post visual-logging, my new favorite tool for debugging OpenCV and Python apps written by Adrian Rosebrock

Build Status Coverage Status

Installation

pip install visual-logging

No extra dependencies

Usage example (see demo.py)

from logging import FileHandler
from vlogging import VisualRecord

if __name__ == '__main__':
    import cv2
    from PIL import Image
    import numpy as np
    import matplotlib.pyplot as plt

    # evenly sampled time at 200ms intervals
    t = np.arange(0., 5., 0.2)

    fig1 = plt.figure()
    plt.plot(t, t, 'r--', t, t ** 2, 'bs', t, t ** 3, 'g^')

    cv_image = cv2.imread('lenna.jpg')
    pil_image = Image.open('lenna.jpg')

    import logging
    logger = logging.getLogger("demo")
    fh = FileHandler('test.html', mode="w")

    logger.setLevel(logging.DEBUG)
    logger.addHandler(fh)

    logger.debug(VisualRecord(
        "Hello from OpenCV", cv_image, "This is openCV image", fmt="png"))

    logger.info(VisualRecord(
        "Hello from PIL", pil_image, "This is PIL image", fmt="jpeg"))

    logger.info(VisualRecord(
        "Hello from pylab", fig1, "This is PyLab graph", fmt="png"))

    logger.warning(
        VisualRecord("Hello from all", [cv_image, pil_image, fig1],
                     fmt="png"))

You can check generated html here

More Repositories

1

translit-ua

Transliteration for ukrainian language that uses officialy approved rules
Python
63
star
2

aiohttp_validate

Simple library that helps you validate your API endpoints requests/responses with json schema
Python
48
star
3

unshred

Experiments on darpa shredder challenge tasks using python & opencv.
Python
39
star
4

declarations.com.ua

Our project to digitaze and open all declaration of ukrainian officials
JavaScript
25
star
5

unshred-tag

Flask/Mongo app to manually tag shreds. Experimental, volatile, unstable. No english translation yet, sorry.
Python
20
star
6

names-translator

Automatic translation and transliteration of ukrainian names into Russian and English
Python
13
star
7

LT2OpenCorpora

Python script to convert ukrainian morphological dictionary to OpenCorpora format. Script runs well under PyPy and also collects some stats/insights/anomalies in the dicts. Use on your own risk.
Python
12
star
8

nbu.rocks

Open data from National Bank of Ukraine
JavaScript
9
star
9

garnahata.in.ua

A new version of GarnaHata project: http://garnahata.in.ua
JavaScript
5
star
10

aiohttp_swaggerify

Library to automatically generate swagger2.0 definition for aiohttp endpoints
Python
5
star
11

comparator

Simple tool to compare/merge similar names which are coming from the same source
Python
5
star
12

vulyk-tagging

JavaScript
4
star
13

thebeast

Python
3
star
14

ragoogle

fun that never stops
CSS
3
star
15

vulyk-declaration

JavaScript
3
star
16

german_registry_parser

Will the fun ever stop
Python
3
star
17

smida_reports

Python
2
star
18

ProjectClarke

Naming all the names
Python
2
star
19

allzorro

PHP
1
star
20

dabi-scraper

One hour long project: scraper for asdev.com.ua (dabi registry)
Python
1
star
21

big_picture

A clear way to see the big picture
Python
1
star
22

pep.org.ua

Python
1
star
23

minions

SCSS
1
star
24

declarations_converter

Temporary repo to implement a converter between old (paper-based) declarations format and new (NACP) one.
Python
1
star
25

dsp-testbed

Simple test bed for my dsp experiments. Plugins, stacks of plugins, tools, measurements
Python
1
star
26

open-declaration

Collection of python scripts to allocate tasks and process raw results.
Python
1
star