RC3D时序动作检测代码调试工作

环境安装

git地址:https://github.com/sunnyxiaohu/R-C3D.pytorch
ubuntu18.04+CUDA9.0: 环境安装教程
anaconda环境如下:
在这里插入图片描述

数据处理与工程编译

1.需要生成训练文件:
下载 thumos14/activity1.3数据集,在preprocess/thumos14文件夹下:

第一步将训练集处理成帧图像:

generate_frames.py做如下修改:
在这里插入图片描述util.py做如下修改:

  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
当然可以!下面是一份基于STM32F103C8T6和RC522模块的串口测试代码示例: ```c #include "stm32f10x.h" #include "rc522.h" void USART1_Init(void) { GPIO_InitTypeDef GPIO_InitStructure; USART_InitTypeDef USART_InitStructure; RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1 | RCC_APB2Periph_GPIOA, ENABLE); // 配置USART1的引脚 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9; // USART1_TX GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10; // USART1_RX GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; GPIO_Init(GPIOA, &GPIO_InitStructure); // 配置USART1 USART_InitStructure.USART_BaudRate = 9600; USART_InitStructure.USART_WordLength = USART_WordLength_8b; USART_InitStructure.USART_StopBits = USART_StopBits_1; USART_InitStructure.USART_Parity = USART_Parity_No; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; USART_Init(USART1, &USART_InitStructure); // 使能USART1 USART_Cmd(USART1, ENABLE); } void USART1_SendChar(char ch) { while (USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET) ; USART_SendData(USART1, (uint8_t)ch); } int main(void) { uint8_t uid[5]; RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE); RC522_Init(); USART1_Init(); while (1) { if (RC522_CheckCard(uid) == MI_OK) { USART1_SendChar('['); for (int i = 0; i < 5; i++) { USART1_SendChar(uid[i]); } USART1_SendChar(']'); } } } ``` 这段代码使用了STM32F103C8T6的USART1串口与RC522模块进行通信。在主循环中,通过调用`RC522_CheckCard`函数检测是否有卡片靠近RC522模块,如果有,则通过USART1串口将卡片的UID发送出去。 请注意,以上代码仅为示例,具体的硬件连接和其他配置可能需要根据你的实际情况进行调整。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值