Code Monkey home page Code Monkey logo

Comments (2)

potipot avatar potipot commented on May 29, 2024 4

I managed to run it by inspecting the code. Do you plan to convert it to a pip library?

Here is my code, maybe somebody will find it useful.

def raw_to_odm(preds, records):
# preds and records are in custom format of lists of BBox from icevision: https://github.com/airctic/icevision
    groundtruth_bbs = []
    detected_bbs = []
    for pred, record in zip(preds, records):
        image_name = record['filepath'].name
        for bbox, label in zip(record['bboxes'], record['labels']):
            class_id=label
            coordinates = bbox.xywh
            bb = BoundingBox(image_name=image_name, class_id=class_id, coordinates=coordinates)
            groundtruth_bbs.append(bb)

        for score, bbox, label in zip(pred['scores'], pred['bboxes'], pred['labels']):
            class_id=label
            coordinates = bbox.xywh
            bb = BoundingBox(image_name=image_name, class_id=class_id, coordinates=coordinates, 
                             bb_type=BBType.DETECTED, confidence=score)
            detected_bbs.append(bb)
    return groundtruth_bbs, detected_bbs

get_coco_summary(groundtruth_bbs, detected_bbs)

output:

{'AP': 0.1096970274832816,
 'AP50': 0.21066336753733456,
 'AP75': 0.09695353970144305,
 'APsmall': 0.004913206881231863,
 'APmedium': 0.19432812877332575,
 'APlarge': 0.2652736296925409,
 'AR1': 0.15589935094323745,
 'AR10': 0.2210287542595406,
 'AR100': 0.23329693548873054,
 'ARsmall': 0.06724119108517042,
 'ARmedium': 0.32722893724006674,
 'ARlarge': 0.3624383693902665}

from review_object_detection_metrics.

rafaelpadilla avatar rafaelpadilla commented on May 29, 2024

@potipot

I'm glad you got it working. We are planning to make the evaluation accessible with a CLI.

We do not have plans to make it a pip library yet. First, it would be good to collect more feedback from users before releasing via pip.

Rafael

from review_object_detection_metrics.

Related Issues (20)

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.