计算速度优化,摄像头读取逻辑改变,分类器更新。

This commit is contained in:
xinyang
2019-07-28 15:59:01 +08:00
parent a5259cbd1f
commit 5a0fdb30af
24 changed files with 17667 additions and 115529 deletions

1
.gitignore vendored
View File

@@ -4,6 +4,7 @@ build
Mark
armor_box_photo
tools/TrainCNN/.idea
tools/TrainCNN/model
tools/TrainCNN/__pycache__
others/include/config/config.h
.DS_Store

View File

@@ -51,10 +51,11 @@ extern std::map<string, int> prior_red;
class LightBlob {
public:
cv::RotatedRect rect; //灯条位置
double areaRatio;
double length; //灯条长度
uint8_t blob_color; //灯条颜色
LightBlob(cv::RotatedRect &r, uint8_t color) : rect(r), blob_color(color) {
LightBlob(cv::RotatedRect &r, double ratio, uint8_t color) : rect(r), areaRatio(ratio), blob_color(color) {
length = max(rect.size.height, rect.size.width);
};
LightBlob() = default;

View File

@@ -18,8 +18,8 @@ class Classifier {
private:
bool state;
vector<vector<MatrixXd>> conv1_w, conv2_w;
vector<double> conv1_b, conv2_b;
vector<vector<MatrixXd>> conv1_w, conv2_w, conv3_w;
vector<double> conv1_b, conv2_b, conv3_b;
MatrixXd fc1_w, fc2_w;
VectorXd fc1_b, fc2_b;
@@ -30,8 +30,10 @@ private:
MatrixXd softmax(const MatrixXd &input);
MatrixXd relu(const MatrixXd &input);
MatrixXd leaky_relu(const MatrixXd &input, float alpha);
vector<vector<MatrixXd>> apply_bias(const vector<vector<MatrixXd>> &input, const vector<double> &bias);
vector<vector<MatrixXd>> relu(const vector<vector<MatrixXd>> &input);
vector<vector<MatrixXd>> leaky_relu(const vector<vector<MatrixXd>> &input, float alpha);
vector<vector<MatrixXd>> max_pool(const vector<vector<MatrixXd>> &input, int size);
vector<vector<MatrixXd>> mean_pool(const vector<vector<MatrixXd>> &input, int size);
vector<vector<MatrixXd>> pand(const vector<vector<MatrixXd>> &input, int val);

View File

@@ -3,12 +3,9 @@
//
#include <armor_finder/armor_finder.h>
#include <additions/additions.h>
#include <log.h>
static double getTimeIntervalms(const timeval& now, const timeval &last){
return (now.tv_sec-last.tv_sec)*1000.0 + (now.tv_usec-last.tv_usec)/1000.0;
}
void ArmorFinder::antiTop() {
static double top_periodms = 0;
static double last_top_periodms = 0;

View File

@@ -58,8 +58,8 @@ ArmorFinder::ArmorFinder(uint8_t &color, Serial &u, const string &paras_folder,
}
void ArmorFinder::run(cv::Mat &src) {
// stateSearchingTarget(src); // for debug
// goto end;
stateSearchingTarget(src); // for debug
goto end;
switch (state) {
case SEARCHING_STATE:
if (stateSearchingTarget(src)) {

View File

@@ -162,6 +162,12 @@ MatrixXd Classifier::relu(const MatrixXd &input){
});
}
MatrixXd Classifier::leaky_relu(const MatrixXd &input, float alpha){
return input.unaryExpr([&](double val){
return (val>0)?(val):(alpha*val);
});
}
vector<vector<MatrixXd>> Classifier::relu(const vector<vector<MatrixXd>> &input){
vector<vector<MatrixXd>> result;
for(int samples=0; samples<input.size(); samples++){
@@ -174,6 +180,18 @@ vector<vector<MatrixXd>> Classifier::relu(const vector<vector<MatrixXd>> &input)
return result;
}
vector<vector<MatrixXd>> Classifier::leaky_relu(const vector<vector<MatrixXd>> &input, float alpha){
vector<vector<MatrixXd>> result;
for(int samples=0; samples<input.size(); samples++){
vector<MatrixXd> sub;
for(int channels=0; channels<input[0].size(); channels++){
sub.emplace_back(leaky_relu(input[samples][channels], alpha));
}
result.emplace_back(sub);
}
return result;
}
vector<vector<MatrixXd>> Classifier::pand(const vector<vector<MatrixXd>> &input, int val){
vector<vector<MatrixXd>> result;
for(int sample=0; sample<input.size(); sample++){
@@ -254,6 +272,8 @@ Classifier::Classifier(const string &folder) : state(true){
conv1_b = load_conv_b(folder+"conv1_b");
conv2_w = load_conv_w(folder+"conv2_w");
conv2_b = load_conv_b(folder+"conv2_b");
conv3_w = load_conv_w(folder+"conv3_w");
conv3_b = load_conv_b(folder+"conv3_b");
fc1_w = load_fc_w(folder+"fc1_w");
fc1_b = load_fc_b(folder+"fc1_b");
fc2_w = load_fc_w(folder+"fc2_w");
@@ -273,7 +293,8 @@ MatrixXd Classifier::calculate(const vector<vector<MatrixXd>> &input) {
vector<vector<MatrixXd>> pool1_result = mean_pool(conv1_result, 2);
vector<vector<MatrixXd>> conv2_result = relu(apply_bias(conv2(conv2_w, pool1_result), conv2_b));
vector<vector<MatrixXd>> pool2_result = mean_pool(conv2_result, 2);
MatrixXd flattened = flatten(pool2_result);
vector<vector<MatrixXd>> conv3_result = relu(apply_bias(conv2(conv3_w, pool2_result), conv3_b));
MatrixXd flattened = flatten(conv3_result);
MatrixXd y1 = fc1_w * flattened;
y1.colwise() += fc1_b;
MatrixXd fc1 = relu(y1);
@@ -303,7 +324,7 @@ int Classifier::operator()(const cv::Mat &image) {
// cout << result << "==============" <<endl;
MatrixXd::Index minRow, minCol;
result.maxCoeff(&minRow, &minCol);
if(result(minRow, minCol) > 0.9){
if(result(minRow, minCol) > 0.90){
return minRow;
}else{
return 0;

View File

@@ -6,6 +6,7 @@
#include <show_images/show_images.h>
#include <options/options.h>
#include <opencv2/highgui.hpp>
#define DO_NOT_CNT_TIME
#include <log.h>
@@ -27,7 +28,7 @@ static bool lengthJudge(const LightBlob &light_blob_i, const LightBlob &light_bl
double side_length;
cv::Point2f centers = light_blob_i.rect.center - light_blob_j.rect.center;
side_length = sqrt(centers.ddot(centers));
return (side_length / light_blob_i.length < 8 && side_length / light_blob_i.length > 0.5);
return (side_length / light_blob_i.length < 10 && side_length / light_blob_i.length > 0.5);
}
static bool lengthRatioJudge(const LightBlob &light_blob_i, const LightBlob &light_blob_j) {
@@ -99,6 +100,7 @@ bool matchArmorBoxes(const cv::Mat &src, const LightBlobs &light_blobs, ArmorBox
if (min_x < 0 || max_x > src.cols || min_y < 0 || max_y > src.rows) {
continue;
}
if((max_x-min_x)/(max_y-min_y) < 0.8) continue;
LightBlobs pair_blobs = {light_blobs.at(i), light_blobs.at(j)};
armor_boxes.emplace_back(
cv::Rect2d(min_x, min_y, max_x - min_x, max_y - min_y),
@@ -116,31 +118,35 @@ bool ArmorFinder::findArmorBox(const cv::Mat &src, ArmorBox &box) {
box.rect = cv::Rect2d(0, 0, 0, 0);
box.id = -1;
if (!findLightBlobs(src, light_blobs)) {
return false;
}
CNT_TIME("blob", {
if (!findLightBlobs(src, light_blobs)) {
return false;
}
});
if (show_light_blobs && src.size() == cv::Size(640, 480)) {
showLightBlobs("light_blobs", src, light_blobs);
cv::waitKey(1);
}
if (!matchArmorBoxes(src, light_blobs, armor_boxes, enemy_color)) {
// cout << "Box fail!" << endl;
return false;
}
CNT_TIME("boxes",{
if (!matchArmorBoxes(src, light_blobs, armor_boxes, enemy_color)) {
// cout << "Box fail!" << endl;
return false;
}
});
if (show_armor_boxes && src.size() == cv::Size(640, 480)) {
showArmorBoxes("boxes", src, armor_boxes);
cv::waitKey(1);
}
if (classifier && use_classifier) {
for (auto &armor_box : armor_boxes) {
cv::Mat roi = src(armor_box.rect).clone();
cv::resize(roi, roi, cv::Size(48, 36));
int c = classifier(roi);
armor_box.id = c;
}
CNT_TIME("classify: %d", {
for (auto &armor_box : armor_boxes) {
cv::Mat roi = src(armor_box.rect).clone();
cv::resize(roi, roi, cv::Size(48, 36));
int c = classifier(roi);
armor_box.id = c;
}
}, armor_boxes.size());
sort(armor_boxes.begin(), armor_boxes.end());
if(armor_boxes[0].id != 0){
box = armor_boxes[0];

View File

@@ -13,14 +13,14 @@ static double lw_rate(const cv::RotatedRect &rect) {
}
static double areaRatio(const std::vector<cv::Point> &contour, const cv::RotatedRect &rect){
static double areaRatio(const std::vector<cv::Point> &contour, const cv::RotatedRect &rect) {
return cv::contourArea(contour) / rect.size.area();
}
static bool isValidLightBlob(const std::vector<cv::Point> &contour, const cv::RotatedRect &rect) {
return (1.5 < lw_rate(rect) && lw_rate(rect) < 10) &&
// (rect.size.area() < 3000) &&
((rect.size.area() < 50 && areaRatio(contour, rect) > 0.4) ||
// (rect.size.area() < 3000) &&
((rect.size.area() < 50 && areaRatio(contour, rect) > 0.4) ||
(rect.size.area() >= 50 && areaRatio(contour, rect) > 0.6));
}
@@ -53,7 +53,7 @@ static float linePointX(const cv::Point2f &p1, const cv::Point2f &p2, int y) {
/// Todo:性能优化后的函数(还有点问题)
static double get_blob_color_opt(const cv::Mat &src, cv::RotatedRect blobPos) {
int blue_cnt=0, red_cnt=0;
int blue_cnt = 0, red_cnt = 0;
blobPos.size.height *= 1.05;
blobPos.size.width *= 1.1;
cv::Point2f corners[4];
@@ -95,6 +95,11 @@ static double get_blob_color_opt(const cv::Mat &src, cv::RotatedRect blobPos) {
}
}
static bool isSameBlob(LightBlob blob1, LightBlob blob2) {
auto dist = blob1.rect.center - blob2.rect.center;
return (dist.x * dist.x + dist.y * dist.y) < 9;
}
static void imagePreProcess(cv::Mat &src) {
static cv::Mat kernel_erode = getStructuringElement(cv::MORPH_RECT, cv::Size(3, 5));
erode(src, src, kernel_erode);
@@ -119,41 +124,76 @@ bool ArmorFinder::findLightBlobs(const cv::Mat &src, LightBlobs &light_blobs) {
std::vector<cv::Mat> channels; // 通道拆分
cv::split(src, channels); /************************/
if (enemy_color == ENEMY_BLUE){ /* */
if (enemy_color == ENEMY_BLUE) { /* */
color_channel = channels[0]; /* 根据目标颜色进行通道提取 */
}else if (enemy_color == ENEMY_RED){ /* */
} else if (enemy_color == ENEMY_RED) { /* */
color_channel = channels[2]; /************************/
}
cv::threshold(color_channel, src_bin_light, 200, 255, CV_THRESH_BINARY); // 二值化对应通道
if(src_bin_light.empty()) return false;
if (src_bin_light.empty()) return false;
imagePreProcess(src_bin_light); // 开闭运算
cv::threshold(color_channel, src_bin_dim, 140, 255, CV_THRESH_BINARY); // 二值化对应通道
if(src_bin_dim.empty()) return false;
if (src_bin_dim.empty()) return false;
imagePreProcess(src_bin_dim); // 开闭运算
if(src_bin_light.size() == cv::Size(640, 480) && show_light_blobs) {
if (src_bin_light.size() == cv::Size(640, 480) && show_light_blobs) {
imshow("bin_light", src_bin_light);
imshow("bin_dim", src_bin_dim);
}
std::vector<std::vector<cv::Point> > light_contours_light, light_contours_dim;
cv::findContours(src_bin_light, light_contours_light, CV_RETR_LIST, CV_CHAIN_APPROX_NONE);
cv::findContours(src_bin_dim, light_contours_dim, CV_RETR_LIST, CV_CHAIN_APPROX_NONE);
for (auto &light_contour : light_contours_light) {
cv::RotatedRect rect = cv::minAreaRect(light_contour);
if (isValidLightBlob(light_contour, rect)) {
light_blobs.emplace_back(rect, get_blob_color(src, rect));
std::vector<std::vector<cv::Point>> light_contours_light, light_contours_dim;
LightBlobs light_blobs_light, light_blobs_dim;
std::vector<cv::Vec4i> hierarchy_light, hierarchy_dim;
cv::findContours(src_bin_light, light_contours_light, hierarchy_light, CV_RETR_CCOMP, CV_CHAIN_APPROX_NONE);
cv::findContours(src_bin_dim, light_contours_dim, hierarchy_dim, CV_RETR_CCOMP, CV_CHAIN_APPROX_NONE);
for (int i = 0; i < light_contours_light.size(); i++) {
if (hierarchy_light[i][2] == -1) {
cv::RotatedRect rect = cv::minAreaRect(light_contours_light[i]);
if (isValidLightBlob(light_contours_light[i], rect)) {
light_blobs_light.emplace_back(
rect, areaRatio(light_contours_light[i], rect), get_blob_color(src, rect)
);
}
}
}
for (auto &light_contour : light_contours_dim) {
cv::RotatedRect rect = cv::minAreaRect(light_contour);
if (isValidLightBlob(light_contour, rect)) {
light_blobs.emplace_back(rect, get_blob_color(src, rect));
for (int i = 0; i < light_contours_dim.size(); i++) {
if (hierarchy_dim[i][2] == -1) {
cv::RotatedRect rect = cv::minAreaRect(light_contours_dim[i]);
if (isValidLightBlob(light_contours_dim[i], rect)) {
light_blobs_dim.emplace_back(
rect, areaRatio(light_contours_dim[i], rect), get_blob_color(src, rect)
);
}
}
}
vector<int> light_to_remove, dim_to_remove;
for (int l = 0; l != light_blobs_light.size(); l++) {
for (int d = 0; d != light_blobs_dim.size(); d++) {
if (isSameBlob(light_blobs_light[l], light_blobs_dim[d])) {
if (light_blobs_light[l].areaRatio > light_blobs_dim[d].areaRatio) {
dim_to_remove.emplace_back(d);
} else {
light_to_remove.emplace_back(l);
}
}
}
}
sort(light_to_remove.begin(), light_to_remove.end(), [](int a, int b) { return a > b; });
sort(dim_to_remove.begin(), dim_to_remove.end(), [](int a, int b) { return a > b; });
for (auto x : light_to_remove) {
light_blobs_light.erase(light_blobs_light.begin() + x);
}
for (auto x : dim_to_remove) {
light_blobs_dim.erase(light_blobs_dim.begin() + x);
}
for (const auto &light : light_blobs_light) {
light_blobs.emplace_back(light);
}
for (const auto &dim : light_blobs_dim) {
light_blobs.emplace_back(dim);
}
return light_blobs.size() >= 2;
}

View File

@@ -20,7 +20,7 @@
#include <additions/additions.h>
#include <config/setconfig.h>
#define DO_NOT_CNT_TIME
//#define DO_NOT_CNT_TIME
#include <log.h>
@@ -63,8 +63,8 @@ int main(int argc, char *argv[]) {
while (true) {
// 打开视频源
if (from_camera) {
video_gimbal = new CameraWrapper(ARMOR_CAMERA_GAIN, 0/*, "armor"*/);
video_chassis = new CameraWrapper(ENERGY_CAMERA_GAIN, 0/*, "energy"*/);
video_gimbal = new CameraWrapper(ARMOR_CAMERA_GAIN, 2/*, "armor"*/);
video_chassis = new CameraWrapper(ENERGY_CAMERA_GAIN, 2/*, "energy"*/);
} else {
video_gimbal = new VideoWrapper("/home/sun/项目/energy_video/7.27.avi");
video_chassis = new VideoWrapper("/home/sun/项目/energy_video/7.27.avi");
@@ -93,14 +93,14 @@ int main(int argc, char *argv[]) {
bool ok = true;
cout << "start running" << endl;
do {
// CNT_TIME("Total", {
CNT_TIME("Total", {
if (mcuData.state == BIG_ENERGY_STATE) {//大能量机关模式
if (last_state != BIG_ENERGY_STATE) {//若上一帧不是大能量机关模式,即刚往完成切换,则需要初始化
LOGM(STR_CTR(WORD_BLUE, "Start Big Energy!"));
destroyAllWindows();
if (from_camera) {
delete video_gimbal;
video_gimbal = new CameraWrapper(ENERGY_CAMERA_GAIN, 0/*, "armor"*/);
video_gimbal = new CameraWrapper(ENERGY_CAMERA_GAIN, 2/*, "armor"*/);
if (video_gimbal->init()) {
LOGM("video_gimbal source initialization successfully.");
} else {
@@ -130,7 +130,7 @@ int main(int argc, char *argv[]) {
destroyAllWindows();
if (from_camera) {
delete video_gimbal;
video_gimbal = new CameraWrapper(ENERGY_CAMERA_GAIN, 0/*, "armor"*/);
video_gimbal = new CameraWrapper(ENERGY_CAMERA_GAIN, 2/*, "armor"*/);
if (video_gimbal->init()) {
LOGM("video_gimbal source initialization successfully.");
} else {
@@ -154,7 +154,7 @@ int main(int argc, char *argv[]) {
destroyAllWindows();
if (from_camera) {
delete video_gimbal;
video_gimbal = new CameraWrapper(ARMOR_CAMERA_GAIN, 0/*, "armor"*/);
video_gimbal = new CameraWrapper(ARMOR_CAMERA_GAIN, 2/*, "armor"*/);
if (video_gimbal->init()) {
LOGM("video_gimbal source initialization successfully.");
} else {
@@ -163,19 +163,23 @@ int main(int argc, char *argv[]) {
}
}
last_state = mcuData.state;
ok = checkReconnect(video_gimbal->read(gimbal_src));
CNT_TIME(STR_CTR(WORD_GREEN, "read img"), {
if(!checkReconnect(video_gimbal->read(gimbal_src))) continue;
});
#ifdef GIMBAL_FLIP_MODE
flip(gimbal_src, gimbal_src, GIMBAL_FLIP_MODE);
#endif
if (!from_camera) extract(gimbal_src);
if (save_video) saveVideos(gimbal_src);
if (show_origin) showOrigin(gimbal_src);
CNT_TIME("Armor Time", {
// CNT_TIME("something whatever", {
if (!from_camera) extract(gimbal_src);
if (save_video) saveVideos(gimbal_src);
if (show_origin) showOrigin(gimbal_src);
// });
CNT_TIME(STR_CTR(WORD_CYAN, "Armor Time"), {
armorFinder.run(gimbal_src);
});
}
// cv::waitKey(0);
// });
});
} while (ok);
delete video_gimbal;
video_gimbal = nullptr;

View File

@@ -6,6 +6,7 @@
#define _ADDITIONS_H_
#include <stdint.h>
#include <sys/time.h>
#include <serial/serial.h>
struct mcu_data{
@@ -30,5 +31,6 @@ void showOrigin(const cv::Mat &gimbal_src, const cv::Mat &chassis_src);
void showOrigin(const cv::Mat &gimbal_src);
void extract(cv::Mat &gimbal_src, cv::Mat &chassis_src);
void extract(cv::Mat &gimbal_src);
double getTimeIntervalms(const timeval& now, const timeval &last);
#endif /* _ADDITIONS_H_ */

View File

@@ -9,11 +9,12 @@
#include <stdio.h>
#include <iostream>
#include <thread>
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/imgproc/imgproc.hpp>
#include "camera/wrapper_head.h"
#ifdef Windows
#include "camera/CameraApi.h"
#elif defined(Linux) || defined(Darwin)
@@ -21,10 +22,13 @@
#endif
class CameraWrapper: public WrapperHead {
friend void cameraCallback(CameraHandle hCamera, BYTE *pFrameBuffer, tSdkFrameHead* pFrameHead,PVOID pContext);
private:
const std::string name;
int mode;
bool init_done;
unsigned char* rgb_buffer;
int camera_cnts;
int camera_status;
@@ -38,6 +42,11 @@ private:
IplImage* iplImage;
int channel;
cv::Mat src_queue[2];
volatile int qhead;
volatile int qtail;
std::thread *readThread;
public:
int gain;
@@ -48,6 +57,8 @@ public:
bool read(cv::Mat& src) final;
bool readRaw(cv::Mat& src);
bool readProcessed(cv::Mat& src);
bool readCallback(cv::Mat& src);
bool readWithThread(cv::Mat &src);
bool changeBrightness(int brightness);
// bool once
};

View File

@@ -146,7 +146,7 @@
gettimeofday(&ts, NULL); \
codes; \
gettimeofday(&te, NULL); \
LOGM(tag": %.1lfms", (te.tv_sec-ts.tv_sec)*1000.0+(te.tv_usec-ts.tv_usec)/1000.0); \
LOGM(tag": %.1lfms", ##__VA_ARGS__, (te.tv_sec-ts.tv_sec)*1000.0+(te.tv_usec-ts.tv_usec)/1000.0); \
}while (0)
#else
#warning "Unsupport plantform for CNT_TIME"

View File

@@ -169,3 +169,7 @@ void extract(cv::Mat &gimbal_src) {//图像预处理将视频切成640×480
gimbal_src = gimbal_src(Rect(0, (width - 480) / 2, 640, 480));
}
}
double getTimeIntervalms(const timeval& now, const timeval &last){
return (now.tv_sec-last.tv_sec)*1000.0 + (now.tv_usec-last.tv_usec)/1000.0;
}

View File

@@ -4,6 +4,7 @@
#include <camera/camera_wrapper.h>
#include <log.h>
#include <additions/additions.h>
#include <options/options.h>
#include <config/setconfig.h>
@@ -15,15 +16,33 @@ using namespace cv;
CameraWrapper::CameraWrapper(int gain, int camera_mode, const std::string &n) :
name(n),
init_done(false),
mode(camera_mode),
camera_cnts(2),
camera_status(-1),
iplImage(nullptr),
rgb_buffer(nullptr),
channel(3),
gain(gain){
gain(gain),
qhead(0),
qtail(0),
readThread(nullptr){
}
void cameraCallback(CameraHandle hCamera, BYTE *pFrameBuffer, tSdkFrameHead* pFrameHead,PVOID pContext){
CameraWrapper *c = (CameraWrapper*)pContext;
CameraImageProcess(hCamera, pFrameBuffer, c->rgb_buffer, pFrameHead);
auto iplImage = cvCreateImageHeader(cvSize(pFrameHead->iWidth, pFrameHead->iHeight), IPL_DEPTH_8U, c->channel);
cvSetData(iplImage, c->rgb_buffer, pFrameHead->iWidth * c->channel); //此处只是设置指针,无图像块数据拷贝,不需担心转换效率
c->src_queue[c->qhead] = cv::cvarrToMat(iplImage).clone();
if((c->qhead+1)%2 == c->qtail){
c->qhead = (c->qhead+1)%2;
c->qtail = (c->qtail+1)%2;
} else {
c->qhead = (c->qhead+1)%2;
}
// LOGM("Get image, [%d %d]", c->qhead, c->qtail);
}
bool CameraWrapper::init() {
CameraSdkInit(1);
@@ -76,6 +95,8 @@ bool CameraWrapper::init() {
}
LOGM("successfully loaded %s!", filepath);
#elif defined(Linux)
CameraReadParameterFromFile(h_camera, PROJECT_DIR"/others/MV-UB31-Group0.config");
CameraLoadParameter(h_camera, PARAMETER_TEAM_A);
CameraSetAeState(h_camera, false);
CameraSetExposureTime(h_camera, CAMERA_EXPOSURE * 1000);
#ifndef WITH_TIME_BASED_CAMERA_GAIN
@@ -106,14 +127,13 @@ bool CameraWrapper::init() {
}
CameraSetAnalogGain(h_camera, gain);
#endif
if (mode == 0) {
CameraSetGain(h_camera, CAMERA_RED_GAIN, CAMERA_GREEN_GAIN, CAMERA_BLUE_GAIN);
CameraSetLutMode(h_camera, LUTMODE_PRESET);
}
#endif
double t;
int g;
CameraGetExposureTime(h_camera, &t);
LOGM("Exposure time: %lfms", t / 1000.0);
CameraGetAnalogGain(h_camera, &g);
LOGM("Exposure time: %lfms, gain:%d", t / 1000.0, g);
/*让SDK进入工作模式开始接收来自相机发送的图像
数据。如果当前相机是触发模式,则需要接收到
触发帧以后才会更新图像。 */
@@ -135,6 +155,10 @@ bool CameraWrapper::init() {
CameraSetIspOutFormat(h_camera, CAMERA_MEDIA_TYPE_BGR8);
LOGM("camera %s color ", camera_name);
}
if(mode == 2){
CameraSetCallbackFunction(h_camera, cameraCallback, this, nullptr);
}
init_done = true;
return true;
}
@@ -144,12 +168,18 @@ bool CameraWrapper::changeBrightness(int brightness) {
}
bool CameraWrapper::read(cv::Mat &src) {
if (mode == 0)return readProcessed(src);
if (mode == 1)return readRaw(src);
if(init_done) {
if (mode == 0)return readProcessed(src);
if (mode == 1)return readRaw(src);
if (mode == 2)return readCallback(src);
if (mode == 3)return readWithThread(src);
} else {
return false;
}
}
bool CameraWrapper::readRaw(cv::Mat &src) {
if (CameraGetImageBuffer(h_camera, &frame_info, &pby_buffer, 1000) == CAMERA_STATUS_SUCCESS) {
if (CameraGetImageBuffer(h_camera, &frame_info, &pby_buffer, 500) == CAMERA_STATUS_SUCCESS) {
if (iplImage) {
cvReleaseImageHeader(&iplImage);
}
@@ -173,7 +203,7 @@ bool CameraWrapper::readRaw(cv::Mat &src) {
bool CameraWrapper::readProcessed(cv::Mat &src) {
// cerr << "Get-1" << endl;
if (CameraGetImageBuffer(h_camera, &frame_info, &pby_buffer, 1000) == CAMERA_STATUS_SUCCESS) {
if (CameraGetImageBuffer(h_camera, &frame_info, &pby_buffer, 500) == CAMERA_STATUS_SUCCESS) {
CameraImageProcess(h_camera, pby_buffer, rgb_buffer,
&frame_info); // this function is super slow, better not to use it.
if (iplImage) {
@@ -192,9 +222,56 @@ bool CameraWrapper::readProcessed(cv::Mat &src) {
}
}
bool CameraWrapper::readCallback(cv::Mat &src) {
timeval ts, te;
gettimeofday(&ts, NULL);
while(qtail==qhead){
gettimeofday(&te, NULL);
if(getTimeIntervalms(te, ts) > 500){
return false;
}
}
src = src_queue[qtail];
// cout << src.size << endl;
qtail = (qtail+1)%2;
return true;
}
bool CameraWrapper::readWithThread(cv::Mat &src){
if(readThread != nullptr){
readThread->join();
src = src_queue[qtail];
qtail = (qtail+1)%2;
delete readThread;
readThread = new std::thread([&](){
readProcessed(src_queue[qhead]);
qhead = (qhead+1)%2;
});
}else{
readThread = new std::thread([&](){
readProcessed(src_queue[qhead]);
qhead = (qhead+1)%2;
});
readThread->join();
src = src_queue[qtail];
qtail = (qtail+1)%2;
delete readThread;
readThread = new std::thread([&](){
readProcessed(src_queue[qhead]);
qhead = (qhead+1)%2;
});
}
return true;
}
CameraWrapper::~CameraWrapper() {
CameraUnInit(h_camera);
//注意先反初始化后再free
if (rgb_buffer != nullptr)
free(rgb_buffer);
if(readThread != nullptr){
readThread->detach();
delete readThread;
}
}

View File

@@ -1,6 +1,7 @@
#!/usr/bin/python3
print("Preparing...")
import tensorflow as tf
import os
from tqdm import tqdm
import generate
import forward
@@ -35,28 +36,22 @@ def save_bias(fp, val):
print(val[i], file=fp)
def save_para(folder, paras):
with open(folder + "/conv1_w", "w") as fp:
save_kernal(fp, paras[0])
with open(folder + "/conv1_b", "w") as fp:
save_bias(fp, paras[1])
with open(folder + "/conv2_w", "w") as fp:
save_kernal(fp, paras[2])
with open(folder + "/conv2_b", "w") as fp:
save_bias(fp, paras[3])
with open(folder + "/fc1_w", "w") as fp:
save_weight_mat(fp, paras[4])
with open(folder + "/fc1_b", "w") as fp:
save_bias(fp, paras[5])
with open(folder + "/fc2_w", "w") as fp:
save_weight_mat(fp, paras[6])
with open(folder + "/fc2_b", "w") as fp:
save_bias(fp, paras[7])
def save_para(folder, paras, names, info):
os.system("mkdir %s/%s" % (folder, info))
for para, name in zip(paras, names):
fp = open("%s/%s/%s" % (folder, info, name), "w")
if name[-1:] == "b":
save_bias(fp, para)
elif name[:2] == "fc":
save_weight_mat(fp, para)
elif name[:4] == "conv":
save_kernal(fp, para)
fp.close()
STEPS = 60000
BATCH = 50
LEARNING_RATE_BASE = 0.001
STEPS = 50000
BATCH = 30
LEARNING_RATE_BASE = 0.0005
LEARNING_RATE_DECAY = 0.99
MOVING_AVERAGE_DECAY = 0.99
@@ -65,7 +60,7 @@ def train(dataset, show_bar=False):
x = tf.placeholder(tf.float32, [None, generate.SRC_ROWS, generate.SRC_COLS, generate.SRC_CHANNELS])
y_= tf.placeholder(tf.float32, [None, forward.OUTPUT_NODES])
keep_rate = tf.placeholder(tf.float32)
nodes, vars = forward.forward(x, 0.01)
nodes, vars, vars_name = forward.forward(x, 0.01)
y = nodes[-1]
ce = tf.nn.sparse_softmax_cross_entropy_with_logits(logits=y, labels=tf.argmax(y_, 1))
@@ -101,35 +96,38 @@ def train(dataset, show_bar=False):
_, loss_value, step = sess.run(
[train_op, loss, global_step],
feed_dict={x: images_samples, y_: labels_samples, keep_rate:0.2}
feed_dict={x: images_samples, y_: labels_samples, keep_rate:0.4}
)
if (i-1) % 100 == 0:
if (i-1) % 500 == 0:
test_images, test_labels = dataset.sample_test_sets(5000)
test_acc, output = sess.run([accuracy, y], feed_dict={x: test_images, y_: test_labels, keep_rate:1.0})
output = np.argmax(output, axis=1)
real = np.argmax(test_labels, axis=1)
print("=============test-set===============")
for n in range(forward.OUTPUT_NODES):
print("label: %d, precise: %f, recall: %f" %
(n, np.mean(real[output==n]==n), np.mean(output[real==n]==n)))
train_images, train_labels = dataset.sample_train_sets(5000)
train_acc, output = sess.run([accuracy, y], feed_dict={x: train_images, y_: train_labels, keep_rate:1.0})
output = np.argmax(output, axis=1)
real = np.argmax(train_labels, axis=1)
print("=============train-set===============")
for n in range(forward.OUTPUT_NODES):
print("label: %d, precise: %f, recall: %f" %
(n, np.mean(real[output==n]==n), np.mean(output[real==n]==n)))
print("\n")
if step % 500 == 0:
test_images, test_labels = dataset.sample_test_sets(6000)
test_acc, output = sess.run([accuracy, y], feed_dict={x: test_images, y_: test_labels, keep_rate:1.0})
output = np.argmax(output, axis=1)
real = np.argmax(test_labels, axis=1)
print("=============test-set===============")
for n in range(forward.OUTPUT_NODES):
print("label: %d, precise: %f, recall: %f" %
(n, np.mean(real[output==n]==n), np.mean(output[real==n]==n)))
train_images, train_labels = dataset.sample_train_sets(6000)
train_acc, output = sess.run([accuracy, y], feed_dict={x: train_images, y_: train_labels, keep_rate:1.0})
output = np.argmax(output, axis=1)
real = np.argmax(train_labels, axis=1)
print("=============train-set===============")
for n in range(forward.OUTPUT_NODES):
print("label: %d, precise: %f, recall: %f" %
(n, np.mean(real[output==n]==n), np.mean(output[real==n]==n)))
print("\n")
if train_acc >= 0.99 and test_acc >= 0.99:
vars_val = sess.run(vars)
save_para(
"model",
vars_val,
vars_name,
"steps:%d-train_acc:%f-test_acc:%f" % (step, train_acc, test_acc)
)
bar.set_postfix({"loss": loss_value, "train_acc": train_acc, "test_acc": test_acc})
vars_val = sess.run(vars)
save_para("/home/xinyang/Workspace/RM_auto-aim/tools/para", vars_val)
print("save done!")
# print("save done!")
# pred = sess.run(y, feed_dict={x: test_images, keep_rate:1.0})

View File

@@ -29,16 +29,22 @@ def max_pool_2x2(x):
CONV1_KERNAL_SIZE = 5
# 第一层卷积输出通道数
CONV1_OUTPUT_CHANNELS = 8
CONV1_OUTPUT_CHANNELS = 4
# 第二层卷积核大小
CONV2_KERNAL_SIZE = 3
# 第二层卷积输出通道数
CONV2_OUTPUT_CHANNELS = 16
CONV2_OUTPUT_CHANNELS = 6
# 第三层卷积核大小
CONV3_KERNAL_SIZE = 3
# 第三层卷积输出通道数
CONV3_OUTPUT_CHANNELS = 8
# 第一层全连接宽度
FC1_OUTPUT_NODES = 100
FC1_OUTPUT_NODES = 50
# 第二层全连接宽度(输出标签类型数)
FC2_OUTPUT_NODES = 15
@@ -49,6 +55,7 @@ OUTPUT_NODES = FC2_OUTPUT_NODES
def forward(x, regularizer=None, keep_rate=tf.constant(1.0)):
vars = []
vars_name = []
nodes = []
conv1_w = get_weight(
@@ -57,7 +64,10 @@ def forward(x, regularizer=None, keep_rate=tf.constant(1.0)):
conv1_b = get_bias([CONV1_OUTPUT_CHANNELS])
conv1 = tf.nn.relu(tf.nn.bias_add(conv2d(x, conv1_w), conv1_b))
pool1 = avg_pool_2x2(conv1)
print("conv1: ", conv1.shape)
print("pool1: ", pool1.shape)
vars.extend([conv1_w, conv1_b])
vars_name.extend(["conv1_w", "conv1_b"])
nodes.extend([conv1, pool1])
conv2_w = get_weight(
@@ -66,27 +76,41 @@ def forward(x, regularizer=None, keep_rate=tf.constant(1.0)):
conv2_b = get_bias([CONV2_OUTPUT_CHANNELS])
conv2 = tf.nn.relu(tf.nn.bias_add(conv2d(pool1, conv2_w), conv2_b))
pool2 = avg_pool_2x2(conv2)
print("conv2: ", conv2.shape)
print("pool2: ", pool2.shape)
vars.extend([conv2_w, conv2_b])
vars_name.extend(["conv2_w", "conv2_b"])
nodes.extend([conv2, pool2])
pool_shape = pool2.get_shape().as_list()
node = pool_shape[1] * pool_shape[2] * pool_shape[3]
reshaped = tf.reshape(pool2, [-1, node])
conv3_w = get_weight(
[CONV3_KERNAL_SIZE, CONV3_KERNAL_SIZE, CONV2_OUTPUT_CHANNELS, CONV3_OUTPUT_CHANNELS]
)
conv3_b = get_bias([CONV3_OUTPUT_CHANNELS])
conv3 = tf.nn.relu(tf.nn.bias_add(conv2d(pool2, conv3_w), conv3_b))
print("conv3: ", conv3.shape)
vars.extend([conv3_w, conv3_b])
vars_name.extend(["conv3_w", "conv3_b"])
nodes.extend([conv3])
conv_shape = conv3.get_shape().as_list()
node = conv_shape[1] * conv_shape[2] * conv_shape[3]
reshaped = tf.reshape(conv3, [-1, node])
reshaped = tf.nn.dropout(reshaped, keep_rate)
print("reshaped: ", reshaped.shape)
fc1_w = get_weight([node, FC1_OUTPUT_NODES], regularizer)
fc1_b = get_bias([FC1_OUTPUT_NODES])
fc1 = tf.nn.relu(tf.matmul(reshaped, fc1_w) + fc1_b)
fc1 = tf.nn.dropout(fc1, keep_rate)
vars.extend([fc1_w, fc1_b])
vars_name.extend(["fc1_w", "fc1_b"])
nodes.extend([fc1])
fc2_w = get_weight([FC1_OUTPUT_NODES, FC2_OUTPUT_NODES], regularizer)
fc2_b = get_bias([FC2_OUTPUT_NODES])
# fc2 = tf.nn.softmax(tf.matmul(fc1, fc2_w) + fc2_b)
fc2 = tf.matmul(fc1, fc2_w) + fc2_b
fc2 = tf.matmul(fc1, fc2_w) + fc2_b
vars.extend([fc2_w, fc2_b])
vars_name.extend(["fc2_w", "fc2_b"])
nodes.extend([fc2])
return nodes, vars
return nodes, vars, vars_name

View File

@@ -1,9 +1,5 @@
8
-0.19897088
2.2773967
-0.07212669
-0.22893764
-0.022769619
0.9122422
1.3221853
-0.21709026
4
0.30789205
-0.043525748
0.2050164
0.74044687

View File

@@ -1,604 +1,304 @@
3
8
4
5
5
-0.42449534
-0.14145629
0.12018829
0.4759054
0.54840434
0.28412497
0.40357414
0.6718681
0.92518467
0.68381476
0.28161842
0.5942867
0.594364
0.7217546
0.77334726
0.18300368
0.3455078
0.270947
0.3452664
0.3419373
-0.07475002
-0.23191033
-0.5056218
-0.5653023
-0.49549124
-0.356733
-0.70811594
-0.6640918
-0.5230208
-0.5567686
-0.34954152
-0.49958408
-0.31039435
-0.55455387
-0.3291702
-0.0030061502
-0.13863257
-0.40160847
-0.53651094
-0.24113898
-0.1733842
-0.2476929
-0.5121031
-0.47203135
-0.43864155
-0.058570273
-0.33658004
-0.6619966
-0.73419136
-0.7045188
0.32072416
0.330073
0.55653447
0.5957652
0.50899994
0.50545204
0.7220086
0.7438928
0.7675144
0.7756041
0.7274903
0.7188184
0.88465214
1.1385522
0.87919647
0.6987736
0.9527178
0.95726067
0.88654906
0.8920211
0.63958967
0.8072574
0.8347145
0.7488403
0.6869278
-0.90990585
-0.6184357
-0.1404704
0.20029725
0.23383331
-0.5078964
0.07829093
0.41757903
0.5164328
0.5336988
-0.21864063
0.07738885
0.46755105
0.6110745
0.64779043
-0.17151009
0.07808888
-0.014565518
0.27556416
0.21755305
-0.42132428
-0.4472937
-0.686964
-0.6123315
-0.36468038
0.39503688
0.7375632
0.6933682
0.59439814
0.5431905
0.4742321
0.8823627
0.77081895
0.7913887
0.5136633
0.5808819
0.80829126
1.0471532
0.6837362
0.6456983
0.6088025
0.9599121
0.79199773
0.64847285
0.7558641
0.72989166
0.8269554
0.70485115
0.773673
0.5633863
-0.6651138
-0.6533556
-0.8055196
-0.70568013
-0.59960866
-0.38753736
-0.75367606
-0.6284249
-0.73716867
-0.4809728
-0.43523777
-0.5271899
-0.6199644
-0.6201511
-0.58342254
-0.41127473
-0.54275876
-0.53538835
-0.56108046
-0.48543084
-0.74164164
-0.64662766
-0.856863
-0.6305302
-0.5739134
0.95437706
1.2035962
1.2448038
1.1763076
1.0001042
0.78790265
1.0511717
1.0552691
1.2410581
0.8918281
0.68448544
0.8909238
0.8172731
0.8248441
0.9374103
0.545665
0.65757316
0.88965493
0.78279305
0.5069958
0.4710934
0.6540229
0.7689269
0.5900862
0.6000688
-0.8985509
-0.5367204
-0.17939755
0.1239284
0.31574073
-0.29208726
0.11087964
0.13841438
0.6425852
0.6579574
0.1677956
0.5068273
0.6169031
0.46504426
0.56336105
0.007133658
0.056750543
0.083241865
0.06789419
0.14583983
-0.6158809
-0.87346137
-0.80676347
-0.70183337
-0.6015298
1.5393821
2.1624126
2.5511134
2.7846441
2.368676
2.4525952
3.2989857
4.029959
3.827302
3.2697773
2.9329424
3.9139073
4.2881436
4.3753977
3.3441596
2.6599689
3.4512682
3.6378286
3.5350695
2.7694979
2.0715785
2.4096649
2.262437
1.9068127
1.4933991
0.067793235
0.4761605
0.8775232
0.79931116
1.0089498
0.3564602
0.70624393
1.1053402
1.3865718
1.4715241
0.46418893
1.059161
1.4488351
1.5534589
1.6705322
0.79103005
1.1441072
1.3800188
1.5281351
1.5740242
0.9623409
0.98793215
1.1669405
1.1152183
1.2492605
-0.15674886
-0.038593877
-0.17274536
0.09258732
0.17494603
0.105809644
0.31649294
0.343589
0.53679705
0.4734059
0.3889172
0.5807728
0.67378217
0.6827083
0.7268035
0.60358465
0.7300566
1.0874548
1.0207677
0.84341484
0.60612875
0.8210886
1.0350081
0.87764287
1.0081718
1.3859847
2.0778801
2.148741
2.4518552
1.9672226
2.5095375
3.0291762
3.4696164
3.2318525
2.4367645
2.8905299
3.4577188
3.8412285
3.5718715
2.7076635
2.91653
3.1068695
3.2963896
2.8063552
1.9206675
1.9905787
2.0144224
1.754742
1.4237579
0.83947563
0.2254852
0.03469266
-0.05631122
0.04464834
-0.2178017
0.13702668
0.16909239
0.26976383
0.068580456
0.12111518
0.39565983
0.57780766
0.48672187
0.3581179
0.2925836
0.5067063
0.42480332
0.46175724
0.51814044
0.094496034
0.3766073
0.46016395
0.40080497
0.3402491
0.21284883
0.13231997
-0.013396452
-0.083948776
0.012691039
0.11314143
0.09580059
0.2377315
0.41866076
0.15490921
0.103149235
0.18240465
0.1797153
0.4242559
0.18161982
0.2963119
0.20458256
0.20636415
0.39781362
0.23634791
0.122939676
0.24806741
0.13085991
0.16097488
-0.020796934
0.17553945
0.6122431
0.5468711
0.7881819
0.70415086
0.76530534
0.23065606
0.26207468
0.22612737
0.3477262
0.33311552
0.1145771
-0.064461164
-0.15550038
-0.17301485
-0.1755835
-0.46472925
-0.32503256
-0.30224133
-0.49536815
-0.5347998
-0.62774706
-0.52409613
-0.46520838
-0.47201794
-0.62468505
1.2727304
1.8184105
2.2249503
2.4140065
1.7565204
2.7623854
3.196057
3.6894598
3.521049
2.7936237
3.4329123
3.8600874
4.2160697
3.905414
2.9514873
3.2884743
3.810133
3.8212693
3.4374819
2.47835
2.4106874
2.5125678
2.35327
1.9101305
1.2425265
-0.03470229
0.7919308
1.3452832
1.2696229
1.04937
0.9344194
1.8166728
2.1765978
2.4447913
1.6805668
1.2032535
2.2395353
2.6600883
2.8381574
1.9751589
1.1395236
1.8099883
2.0537355
2.181522
1.5130651
0.4666265
0.76658946
0.99030006
0.7782916
0.19490543
-0.86873436
-0.6494321
-0.3110133
-0.086757496
-0.061029676
-0.79375947
-0.47139648
0.07530813
0.17621484
0.28143188
-0.54239106
-0.15787664
0.18588926
0.3305964
0.52410334
-0.43658426
-0.16318789
0.25725472
0.3821112
0.43296495
-0.34542954
-0.13750273
0.1684193
0.066175155
-0.109317034
-0.6713239
-0.704688
-0.41100273
-0.5969387
-0.5914036
-0.5237271
-0.36877418
-0.32102436
-0.2706671
-0.14425935
-0.24273401
-0.05300261
0.0068080607
-0.030264616
-0.07868397
-0.11762654
0.19707958
0.21811731
0.44130355
0.21699134
0.060512982
0.19437213
0.55949223
0.32470936
0.28635567
1.1079576
1.7189704
2.413394
2.4546094
1.8035649
2.1479077
3.1008422
3.601715
3.365891
2.4578235
2.5486002
3.5174582
3.9265308
3.515769
2.5787847
2.4205306
3.1097507
3.152673
2.882059
1.976877
1.6673613
1.9114503
1.7297668
1.4748011
0.6597555
-0.42657572
-0.52120584
-0.68196577
-0.69425035
-0.9403177
-0.30822635
-0.46618125
-0.5267847
-0.493324
-0.65498495
-0.23576419
-0.16038808
-0.16629791
-0.3212767
-0.59757406
-0.004436309
-0.00716624
-0.11501519
-0.18837191
-0.39238173
0.050632488
0.14269532
-0.121495865
-0.26217306
-0.37235448
0.6217619
0.75724506
0.81917787
0.82933223
0.8388242
0.8166705
0.95639604
0.9749462
1.0679555
0.88015705
0.9423948
1.1189271
0.9902488
1.072058
1.1399423
0.96763176
0.97359556
1.1033723
1.064764
0.90642184
0.70701605
0.80866563
0.71614605
0.6529501
0.8378095
-0.0864334
0.05153916
0.06473441
-0.12220235
0.11894611
-0.2647296
-0.62840766
-0.621625
-0.4897769
-0.37764832
-0.6673036
-1.0537109
-1.1991285
-1.0963191
-0.96230215
-1.0695108
-1.3443365
-1.3382062
-1.6774666
-1.5912658
-1.3784939
-1.3979015
-1.6025708
-1.6357968
-1.8174925
0.57204753
1.1402864
1.5789323
1.6362445
1.1193172
1.8848814
2.7911117
3.185937
3.0631964
1.9419188
2.6837914
3.625602
4.0801044
3.6807868
2.4854035
2.679125
3.3659801
3.3164527
3.082823
1.911974
1.7753979
2.046517
1.8074046
1.2649333
0.53168595
-0.10729549
0.09332296
0.16133511
-0.030649675
0.06557881
-0.053242918
0.19213735
0.15569621
0.3419906
0.1786888
0.19507813
0.24212381
0.4231631
0.08838954
0.14048508
0.15044038
0.28268903
0.13327996
0.15814759
-0.112561114
0.056091413
0.16789797
-0.11966196
0.038136892
-0.14447927
0.5679466
0.48397887
0.70058227
0.5070652
0.62130994
0.5227163
0.6784681
0.5526853
0.5210595
0.396152
0.31640542
0.459686
0.5702434
0.5931808
0.36256674
0.3457865
0.37771964
0.4625998
0.47415066
0.3938988
0.49735737
0.26142278
0.32298478
0.3374469
0.47159982
-0.18274228
-0.28124171
-0.20628488
-0.10543057
-0.05156752
-0.091269255
-0.0054441793
0.11289734
-0.03441205
-0.13315572
0.20559654
0.10798551
-0.07475637
-0.0047787298
-0.22890174
0.09388285
0.059628867
0.019401075
0.05334341
-0.1582362
0.017811468
-0.04889371
-0.065829955
-0.04788549
-0.33305293
-0.19116391
-0.28003454
-0.0820173
-0.26577657
-0.11826798
-0.39622292
-0.36510658
-0.11750732
-0.24734864
-0.2803419
-0.1519
-0.23317525
-0.007902931
-0.16537969
-0.19139121
-0.023329364
-0.30243063
-0.24868572
-0.029912082
-0.23020941
-0.31355116
-0.11182503
-0.0692445
-0.35592338
-0.09419684
0.14571323
0.5725029
1.193062
1.2903835
0.9622877
0.525414
1.0394033
1.4996175
1.8389359
1.3628953
0.80069596
1.4277213
1.6703882
1.7443689
1.4166398
0.6203115
1.1946497
1.7266799
1.6697397
1.3126082
0.47843987
0.89622074
1.0277275
1.0125589
0.8202855
0.5230944
0.6464553
0.5895753
0.54708016
0.26677945
0.4320181
0.59073323
0.50776094
0.50096244
0.4625974
0.49336708
0.34545958
0.56925744
0.34867597
0.16094568
0.3861315
0.5891766
0.2174486
0.20948303
0.1000691
0.21441981
0.22367561
0.19896027
0.13936864
0.03653052
0.084119834
0.3999692
0.5730208
0.6282694
0.37436715
0.46807006
0.78820395
0.96178275
0.90761256
0.87396187
0.53964555
0.9532658
0.9813636
1.0613359
0.7933851
0.5819338
0.9753471
1.2284292
0.94796246
0.82767236
0.499911
0.75207883
0.68719465
0.8145963
0.6596423
0.011669106
0.18070999
0.36343256
0.3169534
0.20783305
0.03404153
0.43459386
0.36061177
0.43950805
0.38309076
0.25803936
0.4289157
0.58764404
0.58137804
0.46296367
0.1991764
0.33899468
0.64967453
0.74104553
0.57953227
0.1818072
0.32919815
0.6142047
0.47143123
0.3723565
-0.29113623
0.08584255
0.49546224
0.80879575
0.72197473
-0.01818511
0.4448289
0.86975175
1.0318508
0.70635146
0.2590701
0.55703586
1.2021183
1.1355498
0.929514
-0.0021778075
0.49526876
0.8620847
0.97750324
0.80483395
0.066819414
0.0533782
0.2378203
0.48883578
0.46825472
-0.08690677
-0.098846406
-0.11066464
-0.33117262
-0.13379335
-0.10680438
-0.092536114
-0.06396752
-0.2411913
-0.4162492
-0.27065766
-0.0127258655
-0.22221713
-0.10054428
-0.25341535
-0.36750633
-0.0970442
-0.28783646
-0.3083135
-0.37662375
-0.24937427
-0.36285818
-0.32178807
-0.41167092
-0.64311564
0.15358478
0.45863125
0.680853
0.69516915
0.73355865
0.36617115
0.8283799
0.94936144
0.96523696
0.7651339
0.4159632
0.9592908
1.038713
1.1703031
0.83268124
0.62078
0.8680032
1.1751134
1.0394844
0.9290284
0.527504
0.75912774
0.86471754
0.89958185
0.7007667
0.11127112
0.30424586
0.6125697
0.51516706
0.4895497
0.32818803
0.44973958
0.61502695
0.57045287
0.58641577
0.28688067
0.6754326
0.85857826
0.6959833
0.67804474
0.38325444
0.5163973
0.64538044
0.79433715
0.70066565
0.38258222
0.5113986
0.61964786
0.8566454
0.7331395

View File

@@ -1,17 +1,7 @@
16
0.032270256
2.3110154
0.4078679
0.30516425
-0.027841559
0.80007833
0.10999302
0.83167756
-0.09058099
0.67901427
0.2736649
0.08881351
0.10975416
0.25698876
0.076515704
-0.017468728
6
-0.66018975
-0.010440656
1.4320896
0.6933768
-0.65163565
0.5277429

File diff suppressed because it is too large Load Diff

View File

@@ -1,101 +1,51 @@
100
-0.39040318
-0.031096617
-0.06425226
0.24911235
-0.002578787
-0.086705275
-0.0322658
-0.017816741
-0.11621032
0.21196772
-0.004639828
-0.023076132
-0.50997764
-0.04299724
-0.01989839
-0.011238396
-0.003221448
-0.019384952
-0.0007764693
-0.015599826
0.16373938
-0.0027049272
-0.18095633
-0.050923813
0.12674743
-0.064153716
-0.028386148
-0.059802737
-0.036068685
-0.004065791
-0.03783843
-0.16458924
-0.0328307
-0.032716025
-0.020594684
-0.042352736
-0.084991984
-0.028080234
-0.001538593
-0.10711875
-0.024680987
-0.008004385
-0.5063542
-0.09158748
-0.08181085
-0.22574262
-0.075171836
0.28233245
-0.024944687
-0.0029645876
-0.041441295
-0.08904015
0.30993482
-0.06328518
-0.0075723003
-0.005151164
-0.0021952058
-0.013833341
-0.023337327
-0.01824665
-0.025177158
-0.067239
-0.02126352
0.11769418
-0.64603645
-0.014887376
-0.14686602
-0.020528413
-0.018256638
-0.0017088759
-0.018110225
-0.003289471
1.0441891
0.30619404
-0.001282074
-0.09424017
-0.24455559
-0.026046017
-0.004658401
-0.022633847
-0.022873487
0.4393057
-0.033948973
-0.042779494
-0.0059623853
0.6859317
-0.19052452
-0.020080235
-0.010588832
0.012147919
-0.002949453
0.41500625
-0.16353038
-0.023607356
-0.38747007
-0.014272043
-0.0033837124
-0.1627222
-0.055108108
0.74174875
50
-0.24530283
-0.073897995
-0.067673266
-0.043941643
0.339086
-0.2782574
-0.16835077
-0.01852681
0.3498275
0.38015145
-0.016264258
-0.14133461
0.24981335
-0.025037237
0.736614
-0.1785015
-0.040974453
0.2144458
0.23580065
-0.115499295
-0.09057627
0.28634802
0.58878446
-0.12215623
-0.10074399
0.32165715
0.39080995
0.26881945
-0.14676444
0.50808805
-0.053912967
-0.111540824
-0.10144225
0.0035003617
-0.010641405
0.3912463
0.06348127
-0.11809033
-0.024349451
0.4927379
0.23499253
-0.042348947
0.44671503
0.23698664
-0.18389338
0.10498202
-0.12768361
-0.03513563
0.14860639
0.22698319

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +1,16 @@
15
0.7158619
0.074666105
-0.20262705
-0.32018387
-0.35891113
-0.021645868
0.2373232
0.17633525
-0.4311263
-0.2179705
-0.21293324
0.20182535
-0.8007338
-0.02198011
0.30222887
0.45424584
-0.028361967
-0.06438486
-0.15962061
-0.20572336
-0.111016475
0.24467993
-0.012314044
-0.11952816
-0.20754007
-0.18928203
-0.10316595
-0.33859444
0.15107821
0.022365652

File diff suppressed because it is too large Load Diff