Code Monkey home page Code Monkey logo

FØCAL

Architecture-aware profiling for computer vision applications.

For each library that your application uses, f0cal provides a set of tracepoints that perform efficient runtime inspection of the call stack. Other profiling tools can time function calls; f0cal can show you the relationship between call latency, data size, scheduler events, memory caching, and much more.

f0cal runs in a development sandbox built on top of python3-venv and conan. Use it inside the sandbox, just like you would any other Python command line tool. The profiler output is a set of pre-baked reports for your CI/CD pipeline. And if you really want to nerd out, you can access the trace data directly with pandas.

Quick start

We've made compiling and configuring the profiling infrastructure as easy as possible by providing a bootstrap script.

From the bootstrap URL (recommended):

VENV_DIR=_venv
curl bootstrap.f0cal.com/master | python3 - -v ${VENV_DIR} git
source ${VENV_DIR}/bin/activate
eval $(f0cal env activate -a) # only do this the first time
conan install f0cal-opencv/4.0.1@f0cal/testing --build=missing
f0cal pr add -- <your-exe> <your-exe-args> <...>
f0cal pr view

From git:

VENV_DIR=_venv
git clone https://github.com/f0cal/f0cal && python3 f0cal/scripts/bootstrap.py -v ${VENV_DIR} local
source ${VENV_DIR}/bin/activate
eval $(f0cal env activate -a) # only do this the first time
conan install f0cal-opencv/4.0.1@f0cal/testing --build=missing
f0cal pr add -- <your-exe> <your-exe-args> <...>
f0cal pr view

Here's a complete example you can run to test the workflow:

conan install f0cal-opencv/4.0.1@f0cal/testing --build=missing
conan install invisible_demo/0.1@f0cal/testing
f0cal pr add -- Invisibility_Cloak
f0cal pr view

Output

Simple terminal output:

                                    Latency (ms)             Throughput (fps)                     
                              count          min   max  mean              max       min       mean
prefix           width height                                                                     
cv::add          640   480     1158         0.02  0.09  0.05         48461.35  10861.18   19247.80
cv::addWeighted  640   480      772         0.20  1.09  0.47          5059.68    919.17    2142.63
cv::bitwise_and  640   480     2316         0.29  1.42  0.74          3456.45    704.70    1354.75
cv::bitwise_not  640   480      772         0.01  0.18  0.04         69132.39   5417.38   25808.52
cv::countNonZero 3     3       1158         0.00  0.05  0.00       1221001.22  18233.54  302150.20
cv::cvtColor     640   480     2050         0.03  8.16  1.16         33158.70    122.55     859.75
cv::dilate       3     3        772         0.06  0.38  0.17         17585.82   2637.09    5760.23
                 640   480     1544         0.06  0.38  0.17         17585.82   2637.09    5760.23
cv::erode        3     3        386         0.07  0.34  0.19         14511.05   2926.26    5187.10
                 640   480      772         0.07  0.34  0.19         14511.05   2926.26    5187.10
cv::inRange      1     4       1544         0.25  1.17  0.80          3983.87    852.97    1253.34
                 640   480      772         0.25  1.17  0.80          3983.87    852.97    1253.34
cv::morphologyEx 3     3        772         0.06  0.74  0.28         16902.17   1343.41    3574.38
                 640   480     1544         0.06  0.74  0.28         16902.17   1343.41    3574.38

HTML output:

HTML table

Library support

To view a complete list of the AI/ML/CV libraries that f0cal provides tracepoints for:

conan search -r f0cal

FØCAL's Projects

bootstrap icon bootstrap

Install FØCAL code quickly. `curl bootstrap.f0cal.com/master | python3 - --help`

core icon core

Utility packages, helpers, and the guts of the f0cal Python namespace

core2 icon core2

Guts of the f0cal Python namespace

farm-client icon farm-client

CLI client for FØCAL's cluster of edge devices and AI co-processors

google-coral icon google-coral

Community gathering point for Google Coral dev board and dongle knowledge.

machine icon machine

Machine management for a container-centric world

my-code icon my-code

CLI client for testing and benchmarking your code on edge devices and AI co-processors.

my-device icon my-device

CLI client for your own edge devices and AI co-processors to help you get up and running quickly.

plugnparse icon plugnparse

Venusian decorators and argparse support for quickly building command line applications.

salt icon salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:

saltbox icon saltbox

Sandboxing environement for Saltstack

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.