Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 02 2019 03:41
    symisc commented #16
  • Nov 28 2019 21:16
    pmudry commented #16
  • Nov 26 2019 01:52
    symisc closed #20
  • Nov 26 2019 01:52
    symisc commented #20
  • Nov 25 2019 18:57
    syedmustafa54 opened #20
  • Nov 20 2019 13:28
    tecan commented #18
  • Nov 16 2019 04:41
    jfzcoman commented #19
  • Nov 16 2019 04:35
    jfzcoman commented #19
  • Nov 16 2019 04:32
    symisc commented #19
  • Nov 16 2019 04:13
    jfzcoman commented #19
  • Nov 16 2019 04:12
    jfzcoman commented #19
  • Nov 16 2019 03:09
    symisc commented #19
  • Nov 16 2019 03:00
    jfzcoman closed #19
  • Nov 16 2019 03:00
    jfzcoman commented #19
  • Nov 16 2019 02:27
    symisc commented #19
  • Nov 16 2019 02:17
    symisc commented #19
  • Nov 16 2019 02:14
    jfzcoman commented #19
  • Nov 16 2019 02:09
    jfzcoman commented #19
  • Nov 16 2019 02:09
    jfzcoman commented #16
  • Nov 16 2019 02:08
    jfzcoman commented #16
Symisc Systems
@symisc
If you are capturing video stream directly and no faces were detected with realnet then probably something is wrong with the sod_img pixel conversion and the raw pixels from the video capture.
Symisc Systems
@symisc
Did you use the OpenCV video capture interfaces and convert back an IPL image to sod_img via sod_img_load_from_cv_stream()?
Ross Leitch
@balbatross
I tried to use the CV methods but the API you're using doesn't work well with Cython so I ended up replicating the load from memory assignment and adjusted it for my buffer layout
Symisc Systems
@symisc
I guess you did something wrong with your direct pixel manipulation
Ross Leitch
@balbatross
I can't have because the same code works on my laptop
and I've checked the images are valid by writing them to disk
soham24
@soham24
Hello, I am trying to run this on android. Do you have any sample code for it? I have compiled sod.c , sod.h and both writer and reader files. But always getting 0 nBox
from sod_realnet_detect function.
Symisc Systems
@symisc
I'm guessing that you did not read the target image properly. How did you manage to read the image from your Android device and convert it back to grayscale. could you share some code?
soham24
@soham24
Sure. I will share my code
soham24
@soham24

I need to have have images in mat format to process further.
ConvertBitmapToRGBAMat function works correctly as I have verified it by saving generated grayscale image on device.
Giving my code below.

extern "C"
JNIEXPORT jobject JNICALL
Java_com_sodDetection(JNIEnv *env, jobject instance, jobject bitmap) {

cv::Mat rgbaMat;
cv::Mat grayMat;
jniutils::ConvertBitmapToRGBAMat(env, bitmap, rgbaMat, true);
cv::cvtColor(rgbaMat, grayMat, cv::COLOR_RGBA2GRAY);



sod_realnet *pNet; /* Realnet handle */
int i,rc;
/*
 * Allocate a new RealNet handle */
rc = sod_realnet_create(&pNet);
if (rc != SOD_OK) return reinterpret_cast<jobject>(rc);
/*
 * Register and load a RealNet model.
 * You can train your own RealNet model on your CPU using the training interfaces [sod_realnet_train_start()]
 * or download pre-trained models like this one from https://pixlab.io/downloads
 */
rc = sod_realnet_load_model_from_disk(pNet, "/storage/emulated/0/face.realnet.sod", 0);
if (rc != SOD_OK) return reinterpret_cast<jobject>(rc);


IplImage* imgipl = new IplImage(grayMat);
sod_img img = sod_img_load_cv_ipl(imgipl);

/// sod_img img = sod_img_load_grayscale(zFile);

if (img.data == 0) {
    puts("Cannot load image");
    return 0;
}



unsigned char *zBlob = sod_image_to_blob(img);
/*
 * Bounding boxes array
 */
sod_box *aBoxes;
int nbox;
/*
 * Perform Real-Time detection on this blob
 */
rc = sod_realnet_detect(pNet, zBlob, img.w, img.h, &aBoxes, &nbox);
if (rc != SOD_OK) return reinterpret_cast<jobject>(rc);
/* Consume result */
printf("%d potential face(s) were detected..\n", nbox);
for (i = 0; i < nbox; i++) {
    /* Ignore low score detection */
    if (aBoxes[i].score < 5.0) continue;
    /* Report current object */
    printf("(%s) x:%d y:%d w:%d h:%d prob:%f\n", aBoxes[i].zName, aBoxes[i].x, aBoxes[i].y, aBoxes[i].w, aBoxes[i].h, aBoxes[i].score);
    /* Draw a rose box on the target coordinates */
 //   sod_image_draw_bbox_width(color, aBoxes[i], 3, 255., 0, 225.);
    //sod_image_draw_circle(color, aBoxes[i].x + (aBoxes[i].w / 2), aBoxes[i].y + (aBoxes[i].h / 2), aBoxes[i].w, 255., 0, 225.);
}

// std::cout<<"time daken to detect "<<(clock()-(float)t)/CLOCKS_PER_SEC<<std::endl;
/ Save the detection result /
// sod_img_save_as_png(color, "/storage/emulated/0/yoyo.png");
/ cleanup /
sod_free_image(img);
// sod_free_image(color);
sod_image_free_blob(zBlob);
sod_realnet_destroy(pNet);

return  bitmap;

}

Symisc Systems
@symisc
Try to remove the threshold condition (aBoxes[i].score < 5.0) and check the result. Also does sod_img_load_cv_ipl() save the la image on disk correctly?
Try to save grayMat on disk and load it via sod_img_load_grayscale()
soham24
@soham24
I am getting 0 nBoxes in previous step before setting threshold.
also I tried to load grayscale image from disk directly via sod_img_load_grayscale() this function. but still no detection.
Symisc Systems
@symisc
Then probably no faces were detected. The model you purchased is specialized in detecting frontal faces only such as one from your Webcam or smartphone camera stream. I wonder which image did you use to test the model.
soham24
@soham24
I have used same image. i.e. image taken from smartphone which has frontal face.
soham24
@soham24
Do you have any sample code for android?
Symisc Systems
@symisc
Nope
Symisc Systems
@symisc
WebAssembly, Real-time face detection model is now available to the public. Check https://github.com/symisc/sod/tree/master/WebAssemby for additional information!
Symisc Systems
@symisc
The SOD development team just published a new computer vision article on how to detect vehicles registration plates without heavy Machine Learning techniques, just standard image processing routines already implemented in the SOD library. The article is available to consult here at: https://sod.pixlab.io/articles/license-plate-detection.html.
jjqcat
@jjqcat
multi-core CPU supports?
jjqcat
@jjqcat
how to train multi-classes for SOD RealNets? thanks
ridams
@ridams
does someone know how to convert an AVFrame (pixfmt= rgb24) to sod_img ?
Symisc Systems
@symisc
@jjqcat Multi-core CPU support is available only for the commercial version of SOD. You can take a look at https://pixlab.io/downloads for additional information.
Symisc Systems
@symisc
@jjqcat SOD RealNets supports only one class per training cycle but you can stack multiple models such as pedestrian and car detector in a single run via sod_realnet_load_model_from_disk() thanks to their fast processing speed!
Symisc Systems
@symisc
@ridams Take a look at the response for your opened issue on how to do that: symisc/sod#15
SYED
@syedmustafa54
hello is there any python api code for this ??
any way to download face detection model for free
Pre-trained RealNets Models
Symisc Systems
@symisc
@syedmustafa54 only C/C++ but you can search Github for forign bindings. No, you have to purchase from https://pixlab.io/downloads in order to use the face model.
reBertran
@reBertran
hi. currently, I cloned your available repo from Github to see how your c implementations works but when I compile one of the sample ( in that case cnn_face_detection.c) and running .exe as an output then I'm getting this message / error: "Cannot open SOD model". Do I've a chance to overcome this issue? Regards.
reBertran
@reBertran
In addition to last message: I asked because there is no .sod file in current repo and you described over your website that we need to buy this module if we want to use. Is there any support to university students to give for limited time as free?
Symisc Systems
@symisc
@reBertran You have to download the pretrained model from https://pixlab.io/downloads and it costs a one time flat fee of $20 so it should be affordable even for a university student.
pushtoopen
@pushtoopen
hi there, is it possible to conduct a hough circle/ellipse detection using the SOD libraries? Im specifically looking for elliptical shapes.
Symisc Systems
@symisc
ellipse detection probably could be achieved via the https://sod.pixlab.io/c_api/sod_hough_lines_detect.html interface.
hkarrson
@hkarrson
Hey! Question about inside out tracking: https://groups.google.com/forum/#!topic/sod-embedded/GskyTspdQnM Maybe one of you can answer it.
hkarrson
@hkarrson
:)
Symisc Systems
@symisc
@hkarrson Your question has been answered. Check your inbox for the response.
hkarrson
@hkarrson
Thank you! Unfortunately, I don't know where the inbox is. Do you mean my Gitter inbox? (i'm not sure if that exists. I'm new to gitter)
Nevermind. The message was hidden. I found it!
Thanks!
Nickolas Damofli
@ndamofli
Hi there, has anyone tried to use SOD with Unity 3d?
Nickolas Damofli
@ndamofli
There is a huge need from Unity game/app developers to create robust AR experiences. I believe a Unity plugin implementation exposing SOD capabilities to Unity framework would create a solid revenue stream for Symisc. A RealNet frontal face detector would be a massive hit on Unity Asset Store.
Similar plugins (with very low performance) sell for $500....
Javier Velilla
@jvelilla
Hi, Is there a document describing how to build the library using Microsoft Visual C in mode C.?
Symisc Systems
@symisc
@jvelilla Hi. SOD is written in C99 so compiling with MSVC should be fine (In fact SOD is being developed in Visual Studio 2017). Older version of Microsoft C should have a command line option where you can specify the desired C specification hence C99. SOD is a just a single C file so its a matter of compiler command line invocation no more.
Symisc Systems
@symisc
@ndamofli Hi Nickolas. In fact we are planning todo so in the future. If you have the expertise to port such thing to Unity, please let us know!
SYED
@syedmustafa54
@symisc GPU training is free or we should purchase it. I want to train cnn face detection, gender detection, and more using sod platform. I have trained using TensorFlow, PyTorch, Darknet, and more but this are slow for inference need to see the inference using sod . So CNN with CPU will take years is there any guide to train using GPU.
Symisc Systems
@symisc
@syedmustafa54 The face detection model is already available to download from https://pixlab.io/downloads. If you plan to train a single class such as pedestrian, car, dog, etc., then there is no need for a GPU version, the Realnet training interfaces (https://sod.pixlab.io/api.html#sod_realnet_trainer) should do the work for you. Do not ask for tutorials here, please read the documentation first.