1. 启动redis
- 路径:
E:\Dev\TCTDetect\Projects\ReleaseRedis
1.1. 双击启动 redis-server.exe
1.2. 双击启动redis-cli.exe
在其控制台中输入:SELECT 10
2. 启动Python
- 注意:先安装 python3.8,然后配置一下环境变量;
- 默认路径:
C:\Users\Charles\AppData\Local\Programs\Python\Python38
2.1. 命令行启动 app.py
- 进入如下文件夹
E:\Dev\TCTDetect\Projects\testserver
; - 在此路径下打开cmd;
- 输入:
app.py
;
3. Vistual Studio 启动项目
- 切换到
Release
模式
4. 正常使用
4.1. 以上都正常启动之后,有如下4个窗口:
- redis-server
- redis-cli
- app.py
- Vistual Studio 控制台
4.2. 在 redis-cli窗口输入如下命令,回车,即可进行推理运算。
// lpush wait_slide_queue_1 222` + 图片资源路径
lpush wait_slide_queue_1 222`E:\Dev\PathoLabel\ImageResources\100071175850.sdpc
4.3. 结果展示
127.0.0.1 - - [14/Feb/2022 17:35:51] "GET http://127.0.0.1:9000/tct/test/file/queue/start?taskId=222& HTTP/1.1" 200 -
{'aiSubkey': 'NILM', 'analysisPoint': 42, 'analysisResult': 0.0, 'blur_degree': 1, 'cell_num': 7099, 'dense_center': [23296, 75840, 5120, 3840], 'filename': 'E:\\Dev\\ImageResources\\100071175850.sdpc', 'quality': 1, 'remark': '', 'roiCount': 450, 'roiList': [{'class_id': 29, 'h': 121, 'score': 0.4178593158721924, 'tag': 'LSIL及ASC-US', 'w': 313, 'x': 14190, 'y': 46086}, {'class_id': 31, 'h': 250, 'score': 0.34063538908958435, 'tag': 'HSIL及ASC-H', 'w': 309, 'x': 20111, 'y': 66858}, {'class_id': 29, 'h': 116, 'score': 0.32161378860473633, 'tag': 'LSIL及ASC-US', 'w': 172, 'x': 53653, 'y': 62589}, {'class_id': 35, 'h': 163, 'score': 0.30455079674720764, 'tag': 'AGC-NOS', 'w': 175, 'x': 29235, 'y': 79691}, {'class_id': 29, 'h': 187, 'score': 0.2983638346195221, 'tag': 'LSIL及ASC-US', 'w': 174, 'x': 22539, 'y': 35385}, {'class_id': 29, 'h': 87, 'score': 0.2885768413543701, 'tag': 'LSIL及ASC-US', 'w': 100, 'x': 18244, 'y': 74416}, {'class_id': 29, 'h': 2702, 'score': 0.20497654378414154, 'tag': 'LSIL及ASC-US', 'w': 2558, 'x': 79872, 'y': 15631}, {'class_id': 29, 'h': 107, 'score': 0.16180920600891113, 'tag': 'LSIL及ASC-US', 'w': 159, 'x': 13292, 'y': 47144}, {'class_id': 29, 'h': 214, 'score': 0.15870508551597595, 'tag': 'LSIL及ASC-US', 'w': 175, 'x': 34930, 'y': 65785}, {'class_id': 29, 'h': 2751, 'score': 0.14693346619606018, 'tag': 'LSIL及ASC-US', 'w': 2588, 'x': 46080, 'y': 0}, {'class_id': 29, 'h': 108, 'score': 0.14525164663791656, 'tag': 'LSIL及ASC-US', 'w': 208, 'x': 42312, 'y': 53819}, {'class_id': 35, 'h': 287, 'score': 0.1394871026277542, 'tag': 'AGC-NOS', 'w': 198, 'x': 10969, 'y': 53565}, {'class_id': 29, 'h': 2803, 'score': 0.13843896985054016, 'tag': 'LSIL及ASC-US', 'w': 2489, 'x': 76800, 'y': 71127}, {'class_id': 29, 'h': 2572, 'score': 0.1383250653743744, 'tag': 'LSIL及ASC-US', 'w': 2595, 'x': 83094, 'y': 30720}, {'class_id': 29, 'h': 243, 'score': 0.13642309606075287, 'tag': 'LSIL及ASC-US', 'w': 270, 'x': 36305, 'y': 79874}, {'class_id': 29, 'h': 2761, 'score': 0.13222630321979523, 'tag': 'LSIL及ASC-US', 'w': 2607, 'x': 0, 'y': 15463}, {'class_id': 29, 'h': 359, 'score': 0.1312435269355774, 'tag': 'LSIL及ASC-US', 'w': 350, 'x': 47226, 'y': 78140}, {'class_id': 31, 'h': 2666, 'score': 0.12998856604099274, 'tag': 'HSIL及ASC-H', 'w': 2576, 'x': 83235, 'y': 58399}, {'class_id': 29, 'h': 2609, 'score': 0.1298590898513794, 'tag': 'LSIL及ASC-US', 'w': 2578, 'x': 83370, 'y': 34609}, {'class_id': 29, 'h': 127, 'score': 0.12695656716823578, 'tag': 'LSIL及ASC-US', 'w': 120, 'x': 59278, 'y': 43697}, {'class_id': 29, 'h': 2766, 'score': 0.12478689849376678, 'tag': 'LSIL及ASC-US', 'w': 2576, 'x': 61478, 'y': 80358}, {'class_id': 29, 'h': 2652, 'score': 0.1237097680568695, 'tag': 'LSIL及ASC-US', 'w': 2553, 'x': 6970, 'y': 68377}, {'class_id': 29, 'h': 199, 'score': 0.12018734216690063, 'tag': 'LSIL及ASC-US', 'w': 125, 'x': 61440, 'y': 75320}, {'class_id': 29, 'h': 2755, 'score': 0.11066475510597229, 'tag': 'LSIL及ASC-US', 'w': 2529, 'x': 6724, 'y': 67584}, {'class_id': 2, 'h': 135, 'score': 0.8023961186408997, 'tag': '不成熟(萎缩性)鳞状上皮细胞', 'w': 126, 'x': 20856, 'y': 40686}, {'class_id': 2, 'h': 92, 'score': 0.8002954125404358, 'tag': '不成熟(萎缩性)鳞状上皮细胞', 'w': 82, 'x': 41784, 'y': 79037}, {'class_id': 2, 'h': 108, 'score': 0.7792193293571472, 'tag': '不成熟(萎缩性)鳞状上皮细胞', 'w': 117, 'x': 41745, 'y': 78337}, {'class_id': 2, 'h': 86, 'score': 0.7713683843612671, 'tag': '不成熟(萎缩性)鳞状上皮细胞', 'w': 81, 'x': 28483, 'y': 64329}, {'class_id': 2, 'h': 78, 'score': 0.7680107355117798, 'tag': '不成熟(萎缩性)鳞状上皮细胞', 'w': 84, 'x': 13124, 'y': 38659}, {'class_id': 2, 'h': 109, 'score': 0.7666121125221252, 'tag': '不成熟(萎缩性)鳞状上皮细胞', 'w': 118, 'x': 45704, 'y': 30031}, {'class_id': 2, 'h': 134, 'score': 0.7664957046508789, 'tag': '不成熟(萎缩性)鳞状上皮细胞', 'w': 188, 'x': 59086, 'y': 12154}, {'class_id': 2, 'h': 108, 'score': 0.7615890502929688, 'tag': '不成熟(萎缩性)鳞状上皮细胞', 'w': 94, 'x': 66264, 'y': 33682}, {'class_id': 2, 'h': 194, 'score': 0.7505486011505127, 'tag': ' 不成熟(萎缩性)鳞状上皮细胞', 'w': 151, 'x': 28397, 'y': 19606}, {'class_id': 2, 'h': 77, 'score': 0.7397255897521973, 'tag': '不成熟(萎缩性)鳞状上皮细胞', 'w': 88, 'x': 80633, 'y': 29157}, {'class_id': 10, 'h': 165, 'score': 0.748116672039032, 'tag': '化生细胞', 'w': 131, 'x': 19997, 'y': 15661}, {'class_id': 10, 'h': 170, 'score': 0.7263177037239075, 'tag': '化生细胞', 'w': 202, 'x': 25416, 'y': 9502}, {'class_id': 22, 'h': 229, 'score': 0.7801907658576965, 'tag': '内膜细胞', 'w': 158, 'x': 22414, 'y': 75744}], 'status': 1, 'taskId': '222'}
127.0.0.1 - - [14/Feb/2022 17:36:32] "POST http://127.0.0.1:9000/tct/test/file/queue/finish HTTP/1.1" 200 -