Giter VIP home page Giter VIP logo

Comments (2)

llnk avatar llnk commented on June 21, 2024

It seems I have found the right method to detect the object in a single frame. I wrote this code that calls "getObjBndBoxes()" method:

    srand((unsigned int)time(NULL));
    DataSetVOC voc2007("./VOC2007/");
    voc2007.loadAnnotations();
    //voc2007.loadDataGenericOverCls();

    printf("Dataset:`%s' with %d training and %d testing\n", _S(voc2007.wkDir), voc2007.trainNum, voc2007.testNum);
    printf("%s Base = %g, W = %d, NSS = %d, perSz = %d\n", _S(resName), base, W, NSS, numPerSz);

    Objectness objNess(voc2007, base, W, NSS);


    ValStructVec<float, Vec4i> bboxes;

    Mat query = imread("./VOC2007/JPEGImages/008038.jpg");
    objNess.trainObjectness(100);
    objNess.loadTrainedModel();
    objNess.getObjBndBoxes(query, bboxes, 100);


    for (int i = 0; i < bboxes.size(); i++){
        Rect current(Point2i(bboxes[i][0], bboxes[i][1]), Point2i(bboxes[i][2], bboxes[i][3]));
        rectangle(query, current, Scalar(255,0,0),3);
        imshow("query", query);
        waitKey(0);
    }

The problem is that this method returns too many bounding boxes.. Is there anyway to select just the bounding box of the people and other important object?

I have uploaded the result of BING with all bounding boxes (manually limited to 50)

bingresults

How can I select only the bounding boxes on the people?

from objectness.

bittnt avatar bittnt commented on June 21, 2024

Sorry to reply late. Thanks for providing a possible solution to this.

You might get just the bounding box of the people and other important object by
applying a simple classifier on top of the boundingbox, e.g. frontal face
classifier (already in OpenCV).

On Wed, Sep 17, 2014 at 7:04 PM, llnk [email protected] wrote:

It seems I have found the right method to detect the object in a single
frame. I wrote this code that calls "getObjBndBoxes()" method:

srand((unsigned int)time(NULL));
DataSetVOC voc2007("./VOC2007/");
voc2007.loadAnnotations();
//voc2007.loadDataGenericOverCls();

printf("Dataset:`%s' with %d training and %d testing\n", _S(voc2007.wkDir), voc2007.trainNum, voc2007.testNum);
printf("%s Base = %g, W = %d, NSS = %d, perSz = %d\n", _S(resName), base, W, NSS, numPerSz);

Objectness objNess(voc2007, base, W, NSS);


ValStructVec<float, Vec4i> bboxes;

Mat query = imread("./VOC2007/JPEGImages/008038.jpg");
objNess.trainObjectness(100);
objNess.loadTrainedModel();
objNess.getObjBndBoxes(query, bboxes, 100);


for (int i = 0; i < bboxes.size(); i++){
    Rect current(Point2i(bboxes[i][0], bboxes[i][1]), Point2i(bboxes[i][2], bboxes[i][3]));
    rectangle(query, current, Scalar(255,0,0),3);
    imshow("query", query);
    waitKey(0);
}

The problem is that this method returns too many bounding boxes.. Is there
anyway to select just the bounding box of the people and other important
object?

I have uploaded the result of BING with all bounding boxes

[image: bingresults]
https://cloud.githubusercontent.com/assets/1444881/4302470/53e2c544-3e5a-11e4-892b-5fd25c4e1d16.png


Reply to this email directly or view it on GitHub
#3 (comment).

郑帅
Shuai Zheng (Kyle)
http://kylezheng.org/

from objectness.

Related Issues (15)

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.