Skip to content

Commit 9b1d31f

Browse files
author
Wish
committed
update
1 parent 4d0e3fd commit 9b1d31f

File tree

4 files changed

+122
-8
lines changed

4 files changed

+122
-8
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ python export.py --weights=yolov5s.pt --dynamic --opset=11
145145
```bash
146146
cp yolov5/yolov5m.onnx tensorRT_cpp/workspace/
147147
cd tensorRT_cpp
148-
make run -j32
148+
make yolo -j32
149149
```
150150

151151
## YoloX的支持
@@ -203,7 +203,7 @@ python tools/export_onnx.py -c yolox_m.pth -f exps/default/yolox_m.py --output-n
203203
```bash
204204
cp YOLOX/yolox_m.onnx tensorRT_cpp/workspace/
205205
cd tensorRT_cpp
206-
make run -j32
206+
make yolo -j32
207207
```
208208
209209
## RetinaFace人脸检测支持
@@ -416,7 +416,7 @@ RegisterPlugin(HSwish);
416416
417417
## 执行方式
418418
1. 配置好Makefile中的依赖项路径
419-
2. `make run -j64`即可
419+
2. `make yolo -j64`即可
420420
421421
## 执行结果
422422
```bash

src/application/app_yolo.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,13 @@ static void test(Yolo::Type type, TRT::Mode mode, const string& model){
212212
int app_yolo(){
213213

214214
//iLogger::set_log_level(iLogger::LogLevel::Info);
215-
test(Yolo::Type::X, TRT::Mode::FP32, "yolox_s");
216-
test(Yolo::Type::V5, TRT::Mode::FP32, "yolov5s");
215+
test(Yolo::Type::X, TRT::Mode::FP32, "yolox_m");
216+
//test(Yolo::Type::V5, TRT::Mode::FP32, "yolov5s");
217217
// test(Yolo::Type::X, TRT::Mode::FP16, "yolox_s");
218218
// test(Yolo::Type::V5, TRT::Mode::FP16, "yolov5s");
219219
// test_int8(Yolo::Type::X, "yolox_s");
220220
// test_int8(Yolo::Type::V5, "yolov5s");
221-
test_plugin(TRT::Mode::FP32);
222-
test_plugin(TRT::Mode::FP16);
221+
//test_plugin(TRT::Mode::FP32);
222+
//stest_plugin(TRT::Mode::FP16);
223223
return 0;
224224
}

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void test_all(){
2727
INFO("test done.");
2828
}
2929

30-
int main(int argc, char** argv){
30+
int main11(int argc, char** argv){
3131

3232
const char* method = "yolo";
3333
if(argc > 1){

src/t.cpp

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
#include <stdio.h>
2+
3+
int main111(){
4+
5+
const int a = ('A', 'a');
6+
printf("%c", ('A', 'a'));
7+
8+
char s[] = "Beijing ligong daxue";
9+
int i, j;
10+
for(i = j = 0; s[i] != '\0'; i++){
11+
if(s[i] != ' '){
12+
s[j++] = s[i];
13+
}else{
14+
}
15+
}
16+
s[j] = '\0';
17+
printf("%s", s);
18+
return 0;
19+
}
20+
21+
int main22(){
22+
23+
long num = 0;
24+
FILE* fp = NULL;
25+
26+
if((fp = fopen("fname.dat", "r")) == nullptr){
27+
printf("Can't open the file! ");
28+
//exit(0);
29+
}
30+
31+
while(!feof(fp)){
32+
fgetc(fp);
33+
num++;
34+
}
35+
36+
printf("num=%d\n", num);
37+
fclose(fp);
38+
}
39+
40+
void revstr(char* s){
41+
42+
char* p = s, c;
43+
while(*p) p++;
44+
p--;
45+
46+
if(s < p){
47+
c = *s;
48+
*s = *p;
49+
*p ='\0';
50+
revstr(s+1);
51+
*p = c;
52+
}
53+
}
54+
55+
int main123123(){
56+
57+
char t[] = "abcde";
58+
revstr(t);
59+
printf("%s\n", t);
60+
return 0;
61+
}
62+
63+
#include <stdio.h>
64+
65+
// int pow3(int n, int x){
66+
67+
// int i, last;
68+
// for(last = 1, i = 1, i <= x; i++)
69+
// last = /**/;
70+
71+
// return last;
72+
// }
73+
74+
// int main(){
75+
76+
// int x, n, min, flag=1;
77+
// scanf("%d", &n);
78+
79+
// for(min = 2; flag; min++)
80+
// for(x=1; x < min && flag; x++)
81+
// if(/**/ && pow3(n, x) == pow3(n, min-x)){
82+
// printf("x=%d,y=%d", x, min-x);
83+
// /**/
84+
// }
85+
// return 0;
86+
// }
87+
88+
// /******************************************************************************
89+
90+
// Online C Compiler.
91+
// Code, Compile, Run and Debug C program online.
92+
// Write your code in this editor and press "Run" button to compile and execute it.
93+
94+
// *******************************************************************************/
95+
96+
#include <stdio.h>
97+
int pow3(int n, int x){
98+
int i, last;
99+
for (last = 1, i = 1; i <= x ; i++)
100+
last = last * n;
101+
return (last);
102+
}
103+
104+
int main(){
105+
int x,n,min, flag = 1;
106+
scanf("%d",&n);
107+
for(min = 2; flag; min++)
108+
for (x = 1; x< min&&flag; x++)
109+
if ((x != min - x) && pow3(n, x) == pow3(n, min - x)){
110+
printf("x=%d,y = %d",x,min- x);
111+
flag = 0;
112+
}
113+
return 0;
114+
}

0 commit comments

Comments
 (0)