Modifikace README, zadání 1.0
This commit is contained in:
@ -1,15 +0,0 @@
|
||||
#Not used for project
|
||||
|
||||
[BITS 64]
|
||||
|
||||
global f1:function
|
||||
|
||||
|
||||
section .data
|
||||
|
||||
|
||||
section .text
|
||||
|
||||
f1:
|
||||
mov rax, 0
|
||||
ret
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Prior boxes for RetinaNet
|
||||
* Tomas Goldmann,2023
|
||||
*/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
* Functions for reading and processing txt file with floats
|
||||
* Tomas Goldmann,2024
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*
|
||||
* Non-maximum suppression
|
||||
* Tomas Goldmann,2024
|
||||
*/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <inttypes.h>
|
||||
#include <dlfcn.h>
|
||||
#include "ipa_tool.h"
|
||||
|
||||
#include <opencv2/highgui.hpp>
|
||||
@ -17,8 +16,13 @@ using namespace cv;
|
||||
#include "utils.hpp"
|
||||
#include "reader.hpp"
|
||||
|
||||
//example: call extern function
|
||||
extern "C" { void f1(int a);}
|
||||
|
||||
#define CONFIDENCE_THRESHOLD 0.999
|
||||
#define INPUT_WIDTH 640
|
||||
#define INPUT_HEIGHT 480
|
||||
#define ANCHORS_COUNT 12600
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
@ -31,21 +35,25 @@ int main(int argc, char** argv)
|
||||
|
||||
if (image.empty())
|
||||
{
|
||||
cout << "Could not open or find the image" << endl;
|
||||
cout << "Could not open or find a image" << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
//All constants refer to the configuration used in prior_boxes.cpp and to the 640x480 resolution.
|
||||
std::vector<int> image_size = {640, 480};
|
||||
std::vector<int> image_size = {INPUT_WIDTH, INPUT_HEIGHT};
|
||||
std::vector<float> variances = {0.1f, 0.2f};
|
||||
size_t total0_len = 12600*4;
|
||||
size_t total1_len = 12600*2;
|
||||
size_t total0_len = ANCHORS_COUNT*4;
|
||||
size_t total1_len = ANCHORS_COUNT*2;
|
||||
size_t num_anchors = total0_len / 4;
|
||||
|
||||
PriorBox priorBox(image_size, "projekt");
|
||||
|
||||
std::vector<std::vector<float>> priors = priorBox.forward();
|
||||
|
||||
|
||||
Scalar color(0, 255, 0); // Color of the rectangle (in BGR)
|
||||
int thickness = 2; // Thickness of the rectangle border
|
||||
|
||||
InstructionCounter counter;
|
||||
counter.start();
|
||||
/*******************Part to optmize*********************/
|
||||
@ -72,7 +80,7 @@ int main(int argc, char** argv)
|
||||
|
||||
for (size_t i = 0; i < total1_len/2; i++) {
|
||||
scores.push_back(floatarrscr[i*2+1]);
|
||||
if(floatarrscr[i*2+1] > 0.999)
|
||||
if(floatarrscr[i*2+1] > CONFIDENCE_THRESHOLD)
|
||||
{
|
||||
inds.push_back(i);
|
||||
decoded_boxes[i].push_back(floatarrscr[i*2+1]);
|
||||
@ -87,17 +95,14 @@ int main(int argc, char** argv)
|
||||
|
||||
auto out = nms(det_boxes, 0.4);
|
||||
|
||||
f1(10);
|
||||
//Test
|
||||
//f1(10);
|
||||
|
||||
counter.print();
|
||||
|
||||
|
||||
/************************************************/
|
||||
|
||||
|
||||
Scalar color(0, 255, 0); // Color of the rectangle (in BGR)
|
||||
int thickness = 2; // Thickness of the rectangle border
|
||||
|
||||
for (int i = 0; i < out.size(); i++)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
|
@ -1,7 +1,6 @@
|
||||
.intel_syntax noprefix
|
||||
|
||||
.data
|
||||
constants: .byte 50,50,50,50
|
||||
|
||||
.text
|
||||
|
||||
|
Reference in New Issue
Block a user