#include <iomanip>
#include <iostream>
#include "crowd_decode.hpp"
int main() {
    contextra::CrowdRawContract c{300,3,0,1,{2},std::string(64,'a'),std::string(64,'b'),
        "fixture","CXCYWH_NORMALIZED","RAW_SIGMOID_LOGITS","GLOBAL_TOP300_THEN_MAP"};
    std::vector<float> boxes,logits;
    for(int q=0;q<300;++q) {
        boxes.insert(boxes.end(),{(q%15+.5f)/15,(q/15+.5f)/20,.12f,.13f});
        for(int slot=0;slot<3;++slot)logits.push_back(((q*3+slot)%17-8)/3.f);
    }
    std::cout<<std::setprecision(9);
    for(const auto& b:contextra::decodeCrowdFrame(c,boxes,logits))
        std::cout<<b.classId<<' '<<b.score<<' '<<b.xyxy[0]<<' '<<b.xyxy[1]<<' '<<b.xyxy[2]<<' '<<b.xyxy[3]<<'\n';
}
