Activity for Davis

  • Davis Davis posted a comment on discussion Help

    Na that shouldn't be happening. You should see each dimension changing in value unless it's been running long enough to figure out that those are the only legit values. That would also though require the bounds you set to be tight enough to bottle it up into that area. Or there is just a bug in your code. On Sat, Jan 27, 2024 at 2:29 PM Balázs Bámer kolaloka@users.sourceforge.net wrote: Hi All, I have a problem using find_max_global. I'm using a search space with a dimension of 9, and as the optimizer...

  • Davis Davis posted a comment on discussion Help

    Aside from making sure compiler optimizations are on, use smaller images. See also http://dlib.net/faq.html#Whyisdlibslow On Thu, Nov 16, 2023 at 6:33 AM Nikhil B bwajster@users.sourceforge.net wrote: The code below only runs at 1-2FPS. Need help making the necessary changes to improve the frame rate to about 10fps. The code is implemented on the jetson nano. ~~~ import face_recognition import cv2 import os import dlib import pickle import time print(cv2.version) fpsReport=0 scaleFactor=.25 Encodings=[]...

  • Davis Davis posted a comment on discussion Open Discussion

    I just tried a bunch of values and found some that worked :) On Fri, Aug 5, 2022 at 1:14 AM John Puskin johnpuskin@users.sourceforge.net wrote: Hi Davis. I wonder how do you determine distance as 0.6, margin as 0.04 and dimension as 128 in face recognition? What do you think about for dimension 32, setting distance as 0.3 and margin as 0.02? Thank you for your valuable dlib library. About Margin, Distance and Dimension of Face Recognition Sent from sourceforge.net because you indicated interest in...

  • Davis Davis created a blog post

    dlib C++ Library: 19.24 Released

  • Davis Davis posted a comment on discussion Help

    http://dlib.net/faq.html#HowdoIsetthesizeofamatrixatruntime On Fri, Feb 4, 2022 at 2:35 AM "Kovács János" kovatsjanos@users.sourceforge.net wrote: Hello! I'm stucked with my work. I'm new to dlib. My questions concern (Q1.) the usage of dlib datastructures. My task is to perform spectral_clustering. I studied: http://dlib.net/kkmeans_ex.cpp.html. (Q2.) I have to separate training from the classification. Question 1 1 //In MyClass.cpp 2 void doTrain(size_t pClusterN, size_t pNR, size_t pNC, float...

  • Davis Davis posted a comment on discussion Help

    See http://dlib.net/faq.html#HowdoIsetthesizeofamatrixatruntime

  • Davis Davis created a blog post

    dlib C++ Library: 19.23 Released

  • Davis Davis posted a comment on discussion Open Discussion

    Yeah find_min_box_constrained is what you want. On Mon, Nov 22, 2021 at 12:43 PM Gordon N. gordonn@users.sourceforge.net wrote: I have a non linear equation with one free parameter to solve. Is there a possibility in dlib to set a constraint on that parameter because the equation contains some logarithms and must not be smaller or equal to zero. My first guess is to use dlib::find_min_box_constrained with a lbfgs_search_strategy where the functional is the squared difference from the target result....

  • Davis Davis posted a comment on discussion Open Discussion

    No, it's all 32bit everywhere right now.

  • Davis Davis posted a comment on discussion Open Discussion

    Yeah, that's all correct. There are lots of ways to do it, simplest is probably what you suggested of using imglab to just prerotate by a big value. On Thu, May 27, 2021 at 4:16 AM John Puskin johnpuskin@users.sourceforge.net wrote: mmod automatically determines the detector window's sizes by analyzing the dataset without considering the cropper rotation angle. However if I set cropper rotation angle a high value, (e.g. cropper.set_max_rotation_degrees(90) ) dataset will dramatically change and previous...

  • Davis Davis posted a comment on discussion Open Discussion

    It really depends. It's fundamentally easier to train separate models most of the time since you can tweak and adjust them separately. E.g. you can adjust detector A without any possibility of messing up detector B. At the same time, if you put some effort in you can usually make one single model that does multiple things at much less overall computational cost. On Mon, May 24, 2021 at 3:29 AM John Puskin johnpuskin@users.sourceforge.net wrote: Hi Davis. Which one is the best strategy for multi-object...

  • Davis Davis posted a comment on discussion Open Discussion

    Try training a linear SVM on top of it and see if it works. Might be ok.

  • Davis Davis created a blog post

    dlib C++ Library: 19.22 Released

  • Davis Davis posted a comment on discussion Help

    You should give one of the regression methods in dlib a try before rolling your own solution. http://dlib.net/ml.html#krr_trainer is a good general method for this kind of thing.

  • Davis Davis posted a comment on discussion Open Discussion

    This is expected. The first time you run a network it will call the .setup() function on each layer. Although if you copied the whole layer state you would copy over the flag that says setup was already run. But if you copy only some subset of a layer's state, like only the parameter tensor, then this is an expected outcome. On Mon, Nov 16, 2020 at 5:35 PM Dave dremerso@users.sourceforge.net wrote: Davis, I've noticed an odd behavior after copying network weights from one network to another. This...

  • Davis Davis posted a comment on discussion Help

    You can call sum_rows(m)/m.nr() If you want to run a column wize function on a matrix I think the simplest and most reasonable way is to just write a for loop. A function that applied a lambda would just be a function with a for loop that called the lambda. On Wed, Aug 12, 2020 at 7:34 AM Matt Daley mbdaley@users.sourceforge.net wrote: Hello, bit of a newbie here I'm afraid! I have a matrix. I want to calculate the mean of each column and place these values into a vector. Is there a standard, simple...

  • Davis Davis created a blog post

    dlib C++ Library: 19.21 Released

  • Davis Davis posted a comment on discussion Open Discussion

    It's ok so long as your network has the capacity and resolution to localize things that small. For instance, if the stride of the final layer is 40 pixels then it's definitely not going to be able to work, as it simply won't be able to place boxes on many possible locations. So long as you make the stride small enough (e.g. by not doing too much max pooling or other downsampling, or by upsampling appropriately) you will be fine.

  • Davis Davis posted a comment on discussion Open Discussion

    Yeah you should switch to affine layers when you are going to use it for real. But in that particular example, it feeds only one image at a time to the network. The bn_con layer automatically runs in affine mode when given just one element at a time.

  • Davis Davis posted a comment on discussion Open Discussion

    Right, there is no pretrained model in dlib for this. You could use instance segmentation or a vanilla mmod detector or something like that to do it though. There are always performance and accuracy tradeoffs. Making a high quality training dataset is also non-trivial and where you should spend most of your time. I would look at some CVPR papers that talk about detecting pedestrians or humans if you want more ideas. On Fri, Jun 12, 2020 at 6:32 PM John Puskin johnpuskin@users.sourceforge.net wrote:...

  • Davis Davis created a blog post

    dlib C++ Library: 19.20 Released

  • Davis Davis posted a comment on discussion Help

    Dlib is still just as header only as it always has been. However, I added that dlib/test_for_odr_violations.h file because I constantly get questions from people who were doing silly things with their builds, getting errors that have nothing to do with dlib, and asking me about it. If you blank out the contents of dlib/test_for_odr_violations.h it will all be header only again.

  • Davis Davis posted a comment on discussion Help

    Well, I shouldn't say "all". Dlib has never been all header only. But it should work like you expect.

  • Davis Davis posted a comment on discussion Open Discussion

    Start by annotating 100 faces, or 200 maybe. Train a model using that data and see what you get. Then use that model to label a bunch of other images and go manually move the landmarks to the right places. Then retrain and relabel. Repeat a few times as your grow your dataset.

  • Davis Davis posted a comment on discussion Help

    One layer does batch norm and another just linearly transforms the outputs. The latter is not useful since you will be stacking adjacent to some other linear transformation like a convolution, and two linear things combine into another linear thing, so no additional modeling capacity is gained.

  • Davis Davis posted a comment on discussion Help

    They save an object's state to a stream.

  • Davis Davis posted a comment on discussion Help

    You could train a CNN to do this (e.g. like in http://dlib.net/dnn_imagenet_ex.cpp.html) or just take the output descriptor vector from http://dlib.net/dnn_face_recognition_ex.cpp.html and train a linear SVM on it to do this. The latter is probably easier, and will require less training data. But it might not work as well.

  • Davis Davis posted a comment on discussion Open Discussion

    The pixel types used later don't matter. You could keep using BGR pixels if you wanted to.

  • Davis Davis posted a comment on discussion Help

    That loop is appending to faces, making it bigger, and causing more RAM to be used.

  • Davis Davis posted a comment on discussion Help

    Use git grep to find stuff like this

  • Davis Davis posted a comment on discussion Help

    This is not something that users should fiddle with. It's using a line search using the wolfe conditions: https://en.wikipedia.org/wiki/Wolfe_conditions

  • Davis Davis created a blog post

    dlib C++ Library: 19.18 Released

  • Davis Davis posted a comment on discussion Help

    I looked at the code and this is what is happening. You are passing in the boxes from your dataset to mmod_options. But when you train the network you are passing boxes from the cropper. Those aren't the same thing. Make a window and look at the images from the cropper and the boxes. They are very different. More generally, it doesn't make sense to use the cropper like this without a pyramid. The cropper is zooming in and out of the images, but you don't want that since you have everything at a fixed...

  • Davis Davis posted a comment on discussion Help

    Are you passing the object boxes in the original uncropped images to the mmod_options constructor? This is wrong. You have to tell it about the boxes you will actually use during training. Not some other set of boxes it will never see.

  • Davis Davis posted a comment on discussion Help

    Did you read the instructions to that version of the mmod_options constructor? In particular, did you give it your training boxes? On Tue, Sep 3, 2019 at 5:17 AM "François Moyson" micmacz@users.sourceforge.net wrote: In order to do that, I replaced the network's input pyramid with : input_rgb_image. Also, I changed the mmod_options to : mmod_options options(use_image_pyramid::no, boxes_train); So, I'm not specifying a window size (it's required for this not scale invariant constructor). Also, I'm...

  • Davis Davis posted a comment on discussion Help

    You should use visual studio.

  • Davis Davis posted a comment on discussion Help

    It's fine if some landmarks are outside the box.

  • Davis Davis posted a comment on discussion Help

    That's not the name of the method. See http://dlib.net/python/index.html#dlib.image_dataset_metadata.load_image_dataset_metadata On Fri, Aug 2, 2019 at 1:51 AM Sam sqzr@users.sourceforge.net wrote: Hello I am attempting to load a ImgLab XML annotations file in dlib. So I am using the function |res = dlib.load_image_dataset_metadata(myFile)| and I get the error: AttributeError: module ‘dlib’ has no attribute ‘load_image_dataset_metadata’ Does dlib need a specific module imported to use this function?...

  • Davis Davis posted a comment on discussion Help

    Use a bunch of binary classifiers rather than one vs one. If all the binary classifiers say they don't match then you know the person doesn't match any of them.

  • Davis Davis posted a comment on discussion Open Discussion

    Different SVM algorithms only impact training speed. They won't make the detectors run faster. It sounds like you are saying you have observed a non-linear increase in runtime as you increased the number of detectors. Was it fast for a while but then suddenly got slow at some number of detectors? If so you are probably just running out of RAM and your computer is starting to swap RAM to disk, which is super slow.

  • Davis Davis posted a comment on discussion Open Discussion

    You need to change the size of the filter bank at the first layer if you are going to change the number of input channels. I suppose you can initialize the new weights to zero. I would just copy each layer’s parameters by assigning them to a new network’s parameters.

  • Davis Davis posted a comment on discussion Open Discussion

    No problem. And I’m glad you like dlib :)

  • Davis Davis posted a comment on discussion Open Discussion

    I don't have any examples of using dlib for speech recognition. I would go read academic papers on the subject to find out the most recent methods and go from there.

  • Davis Davis posted a comment on discussion Open Discussion

    Try https://github.com/chili-epfl/attention-tracker

  • Davis Davis posted a comment on discussion Help

    Those aren't the right layer numbers you are using. See http://dlib.net/dnn_introduction2_ex.cpp.html

  • Davis Davis posted a comment on discussion Open Discussion

    Please post a complete and minimal program that reproduces this as an issue on dlib's github page.

  • Davis Davis posted a comment on discussion Help

    Using the gradient norm as a stopping condition is usually not very good. Try objective_delta_stop_strategy by default. As for how to compute the gradient, you can always do so using the chain rule and the classic methods for derivative calculation. There is also http://www.matrixcalculus.org/ which is pretty handy sometimes.

  • Davis Davis posted a comment on discussion Help

    190 variables is too many for find_min_global and relatively a lot for BOBYQA. Both of those methods put a lot of work into selecting the next function evaluation point, making them slow in this case. They are intended to be used to optimize objective functions that are expensive to evaluate. This is particularly true of find_min_global, which spends a lot of compute on selecting good points to evaluate. Or it's a lot anyway relative to something like BOBYQA and especially compared to Powell's method....

  • Davis Davis posted a comment on discussion Help

    I assume it implements the method described https://en.wikipedia.org/wiki/Powell%27s_method, which isn't NEWUOA. How many variables are you optimizing? BOBYQA isn't going to be super fast if you have a super large number of variables. Many steps of it's processing are O(N^2) where N is the number of variables being optimized. NEWUOA is the same way.

  • Davis Davis posted a comment on discussion Help

    Did you see the documentation here: http://dlib.net/dlib/optimization/optimization_least_squares_abstract.h.html#solve_least_squares? It tells you what these things should be.

  • Davis Davis posted a comment on discussion Help

    You should be able to deserialize in c++ without any special effort. Just make the image bigger.

  • Davis Davis posted a comment on discussion Help

    The python API automatically upsamples your images if they are too small given the training window size. In C++ you are expected to do this yourself, if it's something that is useful. It sounds like it is useful in your case.

  • Davis Davis posted a comment on discussion Open Discussion

    If you are running out of heap space it's because you aren't putting the compiler in 64bit mode via -T host=x64. Visual studio 2015 doesn't support C++11.

  • Davis Davis posted a comment on discussion Open Discussion

    I can't say. Try using visual studio 2017, it has better C++11 support. I haven't compiled the latest example programs in visual studio 2015.

  • Davis Davis posted a comment on discussion Open Discussion

    Be sure to follow the instructions here: http://dlib.net/compile.html In particular, note that you should use cmake -G "Visual Studio 14 2015 Win64" -T host=x64 ..

  • Davis Davis created a blog post

    dlib C++ Library: 19.17 Released

  • Davis Davis posted a comment on discussion Open Discussion

    No problem :)

  • Davis Davis posted a comment on discussion Open Discussion

    If there are N classes then there are N times as many heatmaps coming out of the network. Each telling where things of that class are located.

  • Davis Davis posted a comment on discussion Open Discussion

    Any time dlib saves stuff to disk you can load those files on any other machine. The code that reads these files is all fully portable and endian agnostic.

  • Davis Davis posted a comment on discussion Help

    The correlation tracker doesn't use the GPU.

  • Davis Davis posted a comment on discussion Help

    To understand the algorithm you can't do any better than reading the cited references. However, yes, some kind of MPC is generally way better. I don't know anyone that uses RL in real world applications. But I do know of many applications of model predictive control, linear quadratic regulators, and similar things. Those methods are very nice and robust. RL is anything but robust. I would trust my life to a reasonably engineered LQR or MPC algorithm. I certainly wouldn't say the same thing for a...

  • Davis Davis posted a comment on discussion Open Discussion

    Use a batch size bigger than 1.

  • Davis Davis posted a comment on discussion Open Discussion

    The CNN/MMOD tool in dlib is setup to use fully convolutoinal networks. It's another single stage network just like YOLO and others. It should be pointed out that these kinds of networks are sliding windows. I'm probably not going to add RNN tooling to dlib any time soon. You can implement word2vec a lot of ways using dlib. I would consult the documentation.

  • Davis Davis posted a comment on discussion Open Discussion

    Not sure, I'm still using a 1080ti.

  • Davis Davis posted a comment on discussion Help

    No, don't edit the project settings. CMake will do everything. Don't fiddle with linker settings.

  • Davis Davis posted a comment on discussion Help

    You don't do anything other than change the debug or release dropdown in visual studio's ide. You don't have to set #define DEBUG or anything like that. In fact, you probably shouldn't. You probably just have a bug in your code unrelated to dlib.

  • Davis Davis posted a comment on discussion Help

    It's just a different algorithm in each version. It doesn't apply.

  • Davis Davis posted a comment on discussion Help

    http://dlib.net/faq.html#Whereisthedocumentationforobjectfunction

  • Davis Davis posted a comment on discussion Open Discussion

    You have to experiment to see what works best. But I would try using a HOG to locate them and a CNN to classify them if speed is really an issue. Otherwise, just use a CNN to do it all in one shot.

  • Davis Davis posted a comment on discussion Help

    http://dlib.net/ml.html#average_precision

  • Davis Davis posted a comment on discussion Help

    Yes, and none of these things has anything to do with slack variables.

  • Davis Davis posted a comment on discussion Help

    There is an epsilon that controls how accurately the objective function being minimized solved. That is a general thing that applies to any kind of numerical optimizer. It's just, how accurate does the solution need to be. Then there is the epsilon insensitivity in SVM regression. It's just a loss that doesn't care about deviations away from the target value if they are less than epsilon in magnitude. If they are more than that then those deviations are penalized an amount proportional to the magnitude...

  • Davis Davis posted a comment on discussion Open Discussion

    The RVM method isn't the most numerically robust method in machine learning. These are some of its issues. I would recommend using an SVM instead with appropriate hyperparameter selection instead. In particular, you can start with this: http://dlib.net/ml.html#auto_train_rbf_classifier. That will train a RBF SVM and do all the hyperparameter selection automatically. It should be much more reliable than the RVM. If you want to do regression then try the krr_trainer or rr_trainer.

  • Davis Davis posted a comment on discussion Open Discussion

    No, there aren’t any that nonlinear constraints. Just box constraints.

  • Davis Davis created a blog post

    dlib C++ Library: 19.16 Released

  • Davis Davis posted a comment on discussion Help

    Grab the latest dlib from github. I fixed the cmake scripts so it should just work regardless of the version.

  • Davis Davis posted a comment on discussion Help

    Sweet :)

  • Davis Davis posted a comment on discussion Open Discussion

    Yes

  • Davis Davis posted a comment on discussion Open Discussion

    That Wikipedia page answers your question. Sent from my iPhone On Aug 31, 2018, at 11:48 AM, r38 rgm38@users.sourceforge.net wrote: Hi How is the correlation calculated in cross_validate_regression_trainer, i.e. does it correspond to any well known algorithm such as those on this wikipedia page? https://en.wikipedia.org/wiki/Correlation_coefficient Thank you Correlation Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/dclib/discussion/442517/ To unsubscribe from...

  • Davis Davis posted a comment on discussion Open Discussion

    No, if you call it really fast it might give the same timestamp. Right, it returns time in microseconds. You could call it multiple times within one microsecond.

  • Davis Davis posted a comment on discussion Open Discussion

    Each network runs on just one GPU. If you want to use 2 GPUs you need to make two networks and set each to run on its own GPU. You use the usual routines provided by CUDA like cudaSetDevice() to control this.

  • Davis Davis posted a comment on discussion Help

    Please file and issue on github and follow the submission instructions.

  • Davis Davis posted a comment on discussion Help

    The central assumption of a tool like find_min_global() is that there are multiple local minima. So you can never have a real convergence test because the global search might find some new better local minima to explore at any moment. You should instead limit the search by runtime. As for why it picks the values it does, it's because it's minimizing whatever cost function you give it. If you are minimizing cross-validation error then the reason it picks those values of C is because they give lower...

  • Davis Davis posted a comment on discussion Open Discussion

    That question is answered in the documentation I sent you. It's all discussed in detail.

  • Davis Davis posted a comment on discussion Open Discussion

    You need to group the data into larger blocks than a single byte. If you just hammer away at the function calls one byte at a time you are going to be CPU bound. So send chunks of like 5000 bytes at a time or something like that to each function in the socket's API. This is the same rule that applies for any kind of I/O, like file I/O. You have to block things into reasonably sized chunks to get decent speed.

  • Davis Davis posted a comment on discussion Open Discussion

    The normal thread safety rules apply here as they do to any other object. See: http://dlib.net/intro.html DNNs are more accurate than HOG but slower to execute. The specific timing will depend on the sizes of your images. Run the examples and see.

  • Davis Davis posted a comment on discussion Open Discussion

    Yes, that can happen for some problems. Numerical stability is tricky. I would recommend the objective delta test for most people. Only use the other one if you know it's appropriate for your problem.

  • Davis Davis posted a comment on discussion Help

    There isn't any GPU version of this in dlib.

  • Davis Davis posted a comment on discussion Help

    All this stuff is documented: http://dlib.net/faq.html#Whereisthedocumentationforobjectfunction

  • Davis Davis posted a comment on discussion Help

    Random forests don't use kernels at all.

  • Davis Davis posted a comment on discussion Help

    Yes. http://dlib.net/faq.html#HowdoIsetthesizeofamatrixatruntime

  • Davis Davis posted a comment on discussion Help

    The dense_feature_extractor defines the sample type to be matrix<double,0,1>, not matrix<double,2,1>.

  • Davis Davis posted a comment on discussion Help

    No worries, thanks for the update!

  • Davis Davis posted a comment on discussion Open Discussion

    I mean use one that takes 2 images and give something other than an opencv image as output.

  • Davis Davis posted a comment on discussion Open Discussion

    You either need to use opencv's method for doing it if you want to use cv::Mat or use the two argument version of pyramid_up().

  • Davis Davis posted a comment on discussion Open Discussion

    It unfortunately only supports ASCII chars.

  • Davis Davis created a blog post

    dlib C++ Library: 19.15 Released

  • Davis Davis created a blog post

    dlib C++ Library: 19.14 Released

  • Davis Davis posted a comment on discussion Help

    Also make sure you are using the latest dlib from github. It's possible that this has been fixed already.

  • Davis Davis posted a comment on discussion Help

    Sure. When you go into the dlib/cmake_utils/test_for_avx folder and run cmake . what does it output?

1 >