Quantcast
Viewing all articles
Browse latest Browse all 22

Dlib 19.8 is Out

Dlib 19.8 is officially out. There are a lot of changes, but the two most interesting ones are probably the new global optimizer and semantic segmentation examples.  The global optimizer is definitely my favorite as it allows you to easily find the optimal hyperparameters for machine learning algorithms.  It also has a very convenient syntax.  For example, consider the Holder table test function:
Image may be NSFW.
Clik here to view.
File:Holder table function.pdf
From https://en.wikipedia.org/wiki/File:Holder_table_function.pdf
Here is how you could use dlib's new optimizer from Python to optimize the difficult Holder table function:
defholder_table(x0,x1):
return-abs(sin(x0)*cos(x1)*exp(abs(1-sqrt(x0*x0+x1*x1)/pi)))

x,y=dlib.find_min_global(holder_table,
[-10,-10],# Lower bound constraints on x0 and x1 respectively
[10,10],# Upper bound constraints on x0 and x1 respectively
80)# The number of times find_min_global() will call holder_table()

Or in C++: 
auto holder_table = [](double x0, double x1){return-abs(sin(x0)*cos(x1)*exp(abs(1-sqrt(x0*x0+x1*x1)/pi)));};

// obtain result.x and result.y
auto result =find_min_global(holder_table,
{-10,-10}, // lower bounds
{10,10}, // upper bounds
max_function_calls(80));

Both of these methods of using the solver find the global minimizer to full floating point precision. The documentation has much more to say about this new tooling.  I'll also make a blog post soon that goes into much more detail on how the method works.

Finally, here are some fun example outputs from the new semantic segmentation example program:
Image may be NSFW.
Clik here to view.
image


Image may be NSFW.
Clik here to view.
image


Image may be NSFW.
Clik here to view.
image


Image may be NSFW.
Clik here to view.
image

Viewing all articles
Browse latest Browse all 22

Trending Articles