自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(71)
  • 收藏
  • 关注

原创 [Paper Reading Note]Soft-NMS -- Improving Object Detection With One Line of Code

Paper Reading NoteURL: https://arxiv.org/pdf/1704.04503TL;DRNMS是目标检测流程中重要的一部分,但当多个目标的overlap较大时,NMS算法会导致检测结果的丢失,针对这一问题,本论文提出了Soft-NMS算法,该算法不会把与最高分框overlap较大的检测框的score置0,而是使用一个与最高分框overlap的连续函数进行衰减...

2020-02-03 18:42:59 263

原创 [Paper Reading Note]Aggregated Residual Transformations for Deep Neural Networks

Paper Reading NoteURL: https://arxiv.org/pdf/1611.05431.pdfTL;DR提出了一种新的backbone结构ResNeXt用于图像分类任务,该结构具有同质性,具有多个相同拓扑结构的branch,这种结构也引入了除width, depth之外的一种新的维度cardinality(基数),实验证明,增加基数能够提高分类准确性,同时,随着模型...

2020-02-02 18:00:54 197

原创 [Paper Reading Note]Mask Scoring R-CNN

Paper Reading NoteURL: https://arxiv.org/pdf/1903.00241.pdfTL;DR之前在实例分割任务中,通常是使用分类的分数作为mask的分数,然而实际上mask的真实分数(预测mask与gt的IoU)与分类分数不能很好的关联,因此,本论文在Mask R-CNN的基础上,加入一条分支,使用预测出的mask和原始输入特征共同mask的IoU,以解...

2020-02-01 20:32:01 257

原创 [Paper Reading Note]Path Aggregation Network for Instance Segmentation

Paper Reading NoteURL: https://arxiv.org/pdf/1803.01534TL;DR提出PANet,在FPN的基础上加入一条bottom-up的路径,缩短了低层特征和高层特征之间的信息路径,加强了整体的特征结构;提出了adaptive feature pooling,池化过程中考虑所有尺度的特征;另外,在Mask RCNN中增加了额外的全连接分支以提升m...

2020-01-31 20:14:01 271

原创 [Paper Reading Note]EfficientDet: Scalable and Efficient Object Detection

Paper Reading NoteURL: https://arxiv.org/pdf/1911.09070.pdfTL;DRGoogle Brain团队基于EfficientNets的后续工作,提出了改进版的FPN, BiFPN, 该结构在PANet的基础上进行了重新设计,并引入了对特征的加权,另外,加入compound scaling方法,形成了EfficientDet。如图1所示,E...

2020-01-30 20:35:30 452

原创 [Paper Reading Note] Scale Match for Tiny Person Detection

Paper Reading NoteURL: https://arxiv.org/pdf/1912.10664.pdfTL;DR论文提出了一个新的benchmark, TinyPerson, 其中包含了很多小的人体目标,另外,作者通过实验发现,在检测任务中,pre-training和detector训练数据之间的mismatch会导致检测器性能下降,因此提出了一种Scale Match手段...

2020-01-29 19:39:06 2224

原创 Leetcode 712 Python

解题思路:动态规划,dp[i][j]表示s1到第i个字符与s2到第j个字符保持相同所需删掉的最少的ascii码的和,若s1[i]==s2[j],则dp[i+1][j+1]与dp[i][j]相同。否则,为删掉s1[i]或删掉s2[j]后,前一个状态加上删去字符的ascii码后的最小值。class Solution(object): def minimumDeleteSum(self, s...

2018-02-26 21:22:30 288

原创 Leetcode 301 Python

解题思路:左右括号一样多时,能保证正确,先处理‘)’,当右括号比左括号多时,从左到右依次删除’)’,为保证不重复删除,记录下删除的位置,每次从该位置后面删除。处理左括号的方法同理,只需将字符串倒序后处理即可。class Solution(object): def removeInvalidParentheses(self, s): """ :type s...

2018-02-25 21:11:17 871

原创 Leetcode 621 Python

解题思路:将数量最多的task排在首位,以该task的间隔进行插空,计算插空能否插满,不能插满则返回带有间隔的时间数,否则返回任务总数即可。class Solution(object): def leastInterval(self, tasks, n): """ :type tasks: List[str] :type n: int ...

2018-02-25 16:43:44 384

原创 Leetcode 517 Python

解题思路:动态规划,当前需要的步数为目前需要移动到前面(从前面移动走)和从当前移动走的最大值,求出所有值后,取最大值。class Solution(object): def findMinMoves(self, machines): """ :type machines: List[int] :rtype: int """...

2018-02-25 15:17:36 209

原创 Leetcode 662 Python

解题思路:记录节点位置,节点层次,进而计算每层宽度,找出最大值即可。# Definition for a binary tree node.# class TreeNode(object):# def __init__(self, x):# self.val = x# self.left = None# self.right =...

2018-02-24 21:53:23 446

原创 Leetcode 458 Python

解题思路:每只猪负责检查一个维度,假设x只猪共能检查n次,则能检查的数量为(n+1)^x个桶(最后一维不需检查)class Solution(object): def poorPigs(self, buckets, minutesToDie, minutesToTest): """ :type buckets: int :type min...

2018-02-16 16:38:23 235

原创 Leetcode 240 Python

解题思路:从右上角扫描,如果当前点大于target,则向左移动,若当前点小于target,则向下移动。class Solution(object): def searchMatrix(self, matrix, target): """ :type matrix: List[List[int]] :type target: int ...

2018-02-15 15:02:20 361

原创 Leetcode 380 Python

思路:每次把最后一个元素移动到被删除的元素的位置,然后删除最后一个元素。使用dicts保存每个元素的位置,交换最后一个元素后,如果位置发生了变化,需要对dicts进行修改。class RandomizedSet(object): def __init__(self): """ Initialize your data structure here. ...

2018-02-14 19:31:27 408

原创 Leetcode 239 Python

解题思路:维护一个双向队列,其保持递减顺序,若队列头位置不在窗口中,队列头出队列,当前数小于队列尾或队列为空,则队列尾出队列,进行循环操作后,加入当前项。队列头即使当前窗口中的最大值。class Solution(object): def maxSlidingWindow(self, nums, k): """ :type nums: List[in...

2018-02-14 15:08:39 531

原创 Leetcode 591 Python

参考了https://www.cnblogs.com/grandyang/p/7016476.html提供的思路思路:使用栈匹配的思想。 1)检查非首字符时,栈是否为空。 2)检查<![CDATA能否和]]>匹配 3)检查</能否和>匹配,若能匹配,则出栈比较 4)检查<能否和>匹配,若能匹配,则检查规则,符合规则方可进栈。 5)全部遍历完...

2018-02-13 21:46:53 279

原创 Leetcode 650 Python

解题思路:动态规划,dp[0],dp[1] = 0, 大于2时,dp[i]=min(dp[i],dp[j]+i/j) (i%j==0)class Solution(object): def minSteps(self, n): """ :type n: int :rtype: int """ dp = ...

2018-02-13 18:32:03 236

原创 Leetcode 672 Python

思路:将4种flip作为4种状态,1,2,3,4可知1+2=3,1+3=2,2+3=1,因此共有1,2,3,4,1+4,2+4,3+4,initial这8种状态,且m>=3,n>=3时可满足,其余情况只需要分别判断。class Solution(object): def flipLights(self, n, m): """ :type ...

2018-02-13 17:24:13 212

原创 Leetcode 365 Python

解题思路:倒水问题,转换为两个杯子向一个大杯子中倒水、舀水的问题,即mx+ny=d,若z<=x+y且z%d==0,说明存在m、n使得最终剩余水为z。根据贝祖等式,d为x、y的最大公约数。class Solution(object): def canMeasureWater(self, x, y, z): """ :type x: int ...

2018-02-13 16:21:16 361

原创 Leetcode 47 Python

解题思路:使用set枚举,使用深度优先搜索,找到所有情况。class Solution(object): def permuteUnique(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """ self.ans = []...

2018-02-13 12:30:03 292

原创 Leetcode 162 Python

思路:使用二分法,若mid > mid+1 说明0-mid必然有一个peak,否则mid-len(nums)必然有一个peak。class Solution(object): def findPeakElement(self, nums): """ :type nums: List[int] :rtype: int ...

2018-02-12 21:29:43 359

原创 Leetcode 124 Python

解题思路:使用递归的方式,root和左右子树最大路径和,以及左右子树分别的路径,取其中最大值,但return时只能是root加左或右子树的路径。# Definition for a binary tree node.# class TreeNode(object):# def __init__(self, x):# self.val = x# s...

2018-02-12 12:39:14 680

原创 Leetcode 125 Python

解题思路:判断是否为字母数字,并转为小写。class Solution(object): def isPalindrome(self, s): """ :type s: str :rtype: bool """ c = [] for i in s: if i.isal...

2018-02-12 10:40:17 324 1

原创 Leetcode 101 Python

思路:判断左子树的左(右)子树及右子树的右(左)子树是否相等# Definition for a binary tree node.# class TreeNode(object):# def __init__(self, x):# self.val = x# self.left = None# self.right = Non...

2018-02-11 22:23:35 668

原创 Leetcode 204 Python

解题思路:使用倍数法,寻找素数,每次将素数及其倍数全部置False,然后寻找下一个未被置False的数。python超时,c++ AC。class Solution {public: int countPrimes(int n) { bool *Del = new bool[n]; Del[2] = false; for(int...

2018-02-11 10:09:39 267

原创 Leetcode 15 Python

解题思路:两边夹逼,跳过重复,使用set去重。class Solution(object): def threeSum(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """ ans = [] nums.sort(...

2018-02-10 11:28:55 811

原创 Leetcode 21 Python

思路:分治法,然后使用之前实现的合并两条有序链表的方法。# Definition for singly-linked list.# class ListNode(object):# def __init__(self, x):# self.val = x# self.next = Noneclass Solution(object): ...

2018-02-09 21:52:59 620

原创 Leetcode 71 C++

解题思路:使用栈记录路径,遇到’.’跳过,遇到’..’则需出栈,其他的情况进栈。如果栈为空,说明是根目录,返回’/’class Solution { public: string simplifyPath(string path) { stack<string> ss; int i = 0; ...

2018-02-09 19:00:26 282

原创 Leetcode 215 Python

解题思路:利用快速排序的思想。每次找一半。最坏情况O(N2),平均时间O(N)。class Solution(object): def findKthLargest(self, nums, k): """ :type nums: List[int] :type k: int :rtype: int """...

2018-02-09 18:58:46 1240

原创 Leetcode 212 Python

解题思路:Trie+dfs,先将word存入trie,然后dfs遍历board,如果前缀不在word则退出,如果是word,且ans中没有,则加入ans。注:trie实现时需用map,否则tleclass TrieNode: # Initialize your data structure here. def __init__(self): self.child...

2018-02-09 13:06:29 616

原创 Leetcode 218 C++

解题思路:参考http://blog.csdn.net/qq508618087/article/details/51311778 利用两个multiset进行解决,将起点、终点分别加入到st中,以负号进行区别,同一高度的起点会排在终点之前。然后,按照顺序处理,如果是起点,则将高度加入height中,如果是终点,则删除掉与之对应起点的高度。在加入起点或删除终点对应的高度时,如果最大的高度发生了变话...

2018-02-08 21:20:47 333

原创 Leetcode 208 Python

解题思路:定义一个新的节点类型,TrieNode,其包含一个标记变量,标记是否可能为最后一个节点,且包含一个大小为26的数组。在Trie中,实现包含Trie节点的多叉树即可。class TrieNode(object): def __init__(self, s): """ Initialize your data structure here. ...

2018-02-08 14:31:03 518

原创 Leetcode 4 Python

解题思路:将题目转化为,找两个有序数组中第k小的数。如果nums1[k/2] < nums2[k/2],则说明第k小的数一定不在nums1[0…k/2]中,可将这部分舍弃。实际操作中,需要比较长度较小的数组的长度与k/2的大小。class Solution(object): def findMedianSortedArrays(self, nums1, nums2): ...

2018-02-08 11:56:00 741

原创 Leetcode 146 Python

解题思路:使用双向链表存储key代表的node。每次访问或添加时,都将该key对应的node置于头部。若长度超过最大限度,则删除尾部的节点。class Node(object): def __init__(self, key, value): self.key = key self.val = value self.pre = Non

2018-02-07 21:30:08 351

原创 Leetcode 73 Python

解题思路:需使用constant-space,因此不能根据matrix大小额外开辟空间。所以使用第0行,第0列来记录。并记录其中是否有0,若有0则最后将0行0列全部置0。class Solution(object): def setZeroes(self, matrix): """ :type matrix: List[List[int]]

2018-02-07 10:36:36 376

原创 Leetcode 188 Python

解题思路:使用动态规划的思想。定义全局收益glob和局部收益local,局部收益即当天已经全部卖出可获得的最大收益。 动态转移方程如下: diff = prices[i] - prices[i-1] local[i][j] = max(local[i-1][j]+diff,glob[i-1][j-1]+max(0,diff)) 此处分两种情况,i-1天时卖了股票和i-1前已经全部卖出。

2018-02-06 21:47:26 338

原创 Leetcode 75 python

解题思路:0移到最左边,2移到最右边,移动后需继续判断,遇到1则跳过。class Solution(object): def sortColors(self, nums): """ :type nums: List[int] :rtype: void Do not return anything, modify nums in-place

2018-02-06 17:48:28 741

原创 Leetcode 151 C++

Leetcode 151 C++解题思路:翻转两次。要注意多余的空格。而且必须in-place修改。使用storeindex进行保存当前修改到的位置。当storeindex不为0时,需要在后面加空格。class Solution {public: void reverseWords(string &s) { reverse(s.begin(),s.end());

2018-02-06 16:01:39 366

原创 Leetcode 297 Python

Leetcode 297 Python解题思路:encode时,使用先序遍历方式存储二叉树,并用“,”隔开。decode时,list为python的引用类型,可以改变其值。# Definition for a binary tree node.# class TreeNode(object):# def __init__(self, x):# self.v

2018-02-06 03:08:43 501

原创 Leetcode 236 python

Leetcode 236 python解题思路:二叉树节点最低公共祖先,可转化为两链条的最后一个公共节点。难点为如何找到两个节点的路径。# Definition for a binary tree node.# class TreeNode(object):# def __init__(self, x):# self.val = x# s

2018-02-05 17:48:22 1113

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除