- 博客(73)
- 收藏
- 关注
原创 LeetCode: 16 回溯
Letter Combinations of a Phone Number"""这种题就是DFS,递归+一堆传引用。迭代解法见http://www.cnblogs.com/grandyang/p/4452220.html,也可以用队列实现。"""class Solution {public: void helper(const string& digits, vecto...
2018-05-08 12:01:12
488
原创 LeetCode: 15 sum
Longest Substring Without Repeating Characters""""""class Solution {public: int lengthOfLongestSubstring(string s) { unordered_map<char,int> map; int i=0, j=0, ans=0, ...
2018-05-06 23:59:56
426
原创 LeetCode: 14
Count Binary Substrings"""简单,但是需要判断啥时候计数“清零”"""class Solution {public: int countBinarySubstrings(string s) { if(s.size()<=1) return 0; int zero = 0, one = 0, ...
2018-04-19 10:57:11
424
原创 UNet
kaggle上的常客(医学图像领域比较常用,也是car分割的冠军模型): https://www.kaggle.com/c/data-science-bowl-2018/discussion/54426 U-Net: Convolutional Networks for Biomedical Image SegmentationVALID padding not SAME paddi...
2018-04-15 23:24:23
27812
原创 HyperNet, RON, FPN
HyperNet: Towards Accurate Region Proposal Generation and Joint Object Detection 主要是融合了不同层级的特征,比较容易理解,参考: https://blog.youkuaiyun.com/u012905422/article/details/52614192 https://blog.youkuaiyun.com/u01236121...
2018-04-15 09:39:44
1051
原创 Learning Region Features for Object Detection
图像特征提取,候选区域生成,候选区域特征提取(roi pooling),区域识别,去重fm x: Cf, H, W RoI b y(b) = RegionFeat(x, b) y(b): K, Cf. K比如是bin的数目 y_k(b): 第k个bin内的特征一般表述: 将y_k(b)的支持区域由roi pooling的一个bin内部扩展到整个fm x。权重依赖于位置p,fm x...
2018-04-15 07:18:07
1702
原创 LeetCode: 13
Second Minimum Node In a Binary Tree/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), l...
2018-04-15 05:01:42
365
原创 LeetCode: 继续easy题12
Subtree of Another Treeclass Solution {public: bool isSame(TreeNode* s, TreeNode* t){ if(!s && !t) return true; if(s && t) return (s-&g...
2018-03-21 06:41:22
362
原创 LeetCode: 继续easy题11
Find Mode in Binary Search Tree"""二叉树的递归,迭代中序遍历。Morris 遍历: https://www.zhihu.com/question/21556707"""Base 7""""""class Solution {public: string convertToBase7(int num) {
2018-03-16 04:50:30
449
原创 LeetCode: 继续easy题10
Assign Cookies"""简单"""class Solution {public: int findContentChildren(vector<int>& g, vector<int>& s) { sort(g.begin(), g.end()); sort(s.begin(), s.end()..
2018-03-12 08:40:45
341
原创 LeetCode: 继续easy题9
Escape The Ghosts""""""class Solution {public: int distance(vector<int>& s1, vector<int>& s2){ return abs(s1[0]-s2[0])+abs(s1[1]-s2[1]); } bool escapeGho..
2018-02-27 06:10:19
277
原创 LeetCode: 继续easy题8
Nth Digit"""蛋疼,老Time Limit Exceeded,结果最后是两个long的地方越界"""class Solution {public: int findNthDigit(int n) { /* i=1: 1,...,9: 9 num_i i=2: 10,...,99: 90 ...
2018-02-25 12:35:12
328
原创 LeetCode: 继续easy题7
Reverse Vowels of a String """"""class Solution {public: bool isVowel(char a){ if(a=='a'||a=='e'||a=='i'||a=='o'||a=='u') return true; if(a=='A'||a=='E'||a=='...
2018-02-16 04:33:48
329
原创 LeetCode: 继续easy题6
Lowest Common Ancestor of a Binary Search Tree"""递归解法,想好边界条件,简单"""/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * ...
2018-02-12 10:51:11
308
原创 LeetCode: 继续easy题5
Contains Duplicate"""简单O(n), O(n)"""class Solution {public: bool containsDuplicate(vector<int>& nums) { unordered_map<int,int> map; for (int i=0; i<nums...
2018-02-11 21:35:43
286
原创 LeetCode: 继续easy题4
Rotate Array"""Cyclic Replacements,这个思路还是挺难写对的==O(n)"""class Solution {public: void rotate(vectorint>& nums, int k) { int current = 0; int next; int buffer, buffer_
2018-01-29 21:50:08
370
原创 FCN: 卷积和转置卷积等
各种卷积的动态图这里y是下一层(i,j)处的值,k是kernel size, s是stride,f泛指卷积层,池化层和激活函数。这些操作都具有局部性,限定在x的delta邻域中。这里是说两个这样的操作可以进行复合,复合后的“等效”kernel size和stride在右下角。 如上图,若第一层的k=3,第二层的k=1,则等效k=3;若第一层的k=3,第二层的k=2,则等效k=
2018-01-15 10:07:37
1514
原创 视频物体检测文献阅读笔记
Impression Network for Video Object Detection 基于印象机制的高效多帧特征融合,解决defocus and motion blur等问题(即视频中某帧的质量低的问题),同时提高速度和性能。 类似TSN,每个segment选一个key frame(注意,TSN做视频分类是在cnn最后才融合不同的segments)。特征融合前需要用Optical
2018-01-06 11:03:39
3093
原创 AlignedReID
旷视的AlignedReID,很有意思。 The end-to-end learning with structure prior is more powerful than a “blind” end-to-end learning.reid难点: 目前triplet loss等用的比较多。Combining softmax loss with metric learning
2018-01-05 09:36:03
5382
原创 LeetCode: 继续easy题3
Best Time to Buy and Sell Stock"""扫描,time n, space 19 ms, beats 10.54%"""class Solution {public: int maxProfit(vectorint>& prices) { int small_id = 0; int value = 0;
2018-01-05 01:30:43
509
原创 Tensorflow object detection API 源码阅读笔记:RPN
Update: 建议先看从编程实现角度学习Faster R-CNN,比较直观。这里由于源代码抽象程度较高,显得比较混乱。faster_rcnn_meta_arch.py中这两个对应知乎文章中RPN包含的3*3和1*1卷积: rpn_box_predictor_features = slim.conv2d(rpn_features_to_crop self._first_stage_box_p
2018-01-03 23:17:13
4982
原创 OHEM,Batch Hard(识别乱入),Focal Loss
一些别人总结的Faster R-CNN后续改进: [目标检测] Faster R-CNN 深入理解 && 改进方法汇总 Faster R-CNN改进篇(一): ION ● HyperNet ● MS CNNTraining Region-based Object Detectors with Online Hard Example Mining 最好先阅读之前博文: Tensorflow o
2018-01-01 12:18:22
5440
原创 人脸检测文献阅读
随便搜索了一下: 人脸检测识别文献阅读总结 检测文章中一般都细节很多,这里只总结主要思路。Joint Training of Cascaded CNN for Face Detectioncascade的优势: handle unbalanced distribution of negative and positive samples. In the early stages, week
2018-01-01 12:02:16
763
原创 基于视频的ReID
Region-based Quality Estimation Network for Large-scale Person Re-identification最近集中刷一波视频分析的文章。又是各帧的叠加,为了修补质量低的帧(从而由视频来获得对一个人更完整的印象或记忆?)。联想京东猪识别竞赛–第二路将人体分区域。u, m, l represent the upper part,
2018-01-01 11:58:48
6708
原创 LeetCode: 继续easy题2
Binary Tree Level Order Traversal II Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf to root)."""基本想法是队列实现BF
2017-12-31 22:47:06
326
原创 LeetCode: 继续easy题
Remove Duplicates from Sorted List Given a sorted linked list, delete all duplicates such that each element appear only once."""9ms, beats 55.59%time O(n), space O(1)"""/** * Definition for sing
2017-12-30 22:54:26
356
原创 视频动作分类文献阅读笔记
太长不看版: trimmed video可以用 TSN+I3D/P3D+Bilinear pooling + non-local block。其中各部分涉及的文章下面都有讲。可以先看之前的文章:Video Analysis 入门。1.TSN 视频数据的中时建模介绍,5s,如high jump,用于剪辑视频分类。 基于双流法,然后对视频不同片段预测的结果进行平均。 TSN是目前最主流且(后续工作
2017-12-28 01:12:20
5840
原创 LeetCode:Plus One, Add Binary, Sqrt(x), Climbing Stairs
Plus One Given a non-negative integer represented as a non-empty array of digits, plus one to the integer."""3 ms, beats 7.49%time: O(n)space: O(n), 也可以改进到O(1), 比如位数变化时直接在vector开头插入一个1也行。"""c
2017-12-24 08:04:24
335
原创 LeetCode: Search Insert Position, Count and Say, Maximum Subarray, Length of Last Word
Search Insert Position Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no dupli
2017-12-21 10:26:11
308
原创 Logistic 多分类
#!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Wed Dec 20 14:54:31 2017@author: wayne"""import pandas as pdimport numpy as npfrom sklearn import preprocessingfrom sklearn.linea
2017-12-21 04:51:18
1021
原创 Tensorflow object detection API 源码阅读笔记:Mask R-CNN
"""The ground-truth label is 1 if the anchor is positive, and is 0 if the anchor is negative. An anchor is labeled as positive if:(a) the anchor is the one with highest IoU overlap with a ground-tru
2017-12-20 10:13:50
3986
3
原创 LeetCode: Merge Two Sorted Lists, Remove Duplicates/Element, strStr()
Merge Two Sorted Lists/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} //C++11初始化列表 * }; */先自己想一下。同
2017-12-18 06:27:18
429
原创 LeetCode: Longest Common Prefix, Valid Parentheses
Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings.直观的想法是弄个while(true)循环,然后遍历array,每遍历一次取出来一个字符,直到取出来的字符不是共有的为止(后面会看到这种其实是最好的,避免了很多重复计算)。也可以不要每
2017-12-18 04:38:23
248
原创 LeetCode: Reverse Integer,Palindrome Number
Reverse Integer Given a 32-bit signed integer, reverse digits of an integer."""1. 26 ms时间复杂度是O(log10(n))"""class Solution {public: int reverse(int x) { int result = 0; int new_
2017-12-17 06:24:58
339
原创 LeetCode: Two Sum
cs231n推荐的starting point:optimizer = tf.train.AdamOptimizer( learning_rate=0.001, #or 5e-4 beta1=0.9,
2017-12-17 04:32:12
350
原创 Tensorflow object detection API 源码阅读笔记:RFCN
有了前面Faster R-CNN的基础,RFCN就比较容易了。"""object_detection/meta_architectures/rfcn_meta_arch.pyThe R-FCN meta architecture is similar to Faster R-CNN and only differs in thesecond stage. Hence this class inh
2017-12-16 11:25:07
2532
1
原创 Tensorflow object detection API 源码阅读笔记:Fast r-cnn
Update: 建议先看从编程实现角度学习Faster R-CNN,比较直观。这里由于源代码抽象程度较高,显得比较混乱。知乎文章中ProposalTargetCreator从RoIs选择一部分(比如128个)用以训练,本应该对应def _loss_box_classifier,但是实现不完全一致,又回到def _postprocess_rpn了,统一在Tensorflow object dete
2017-12-15 11:13:07
2929
原创 Tensorflow object detection API 源码阅读笔记:基本类(1)
之前主要在结合paper看架构,在进入Fast R-CNN部分之前,先仔细研究一下一些基本类的具体实现。和当时读OpenFOAM的源代码套路差不多,不过OpenFOAM的变态c++让人特别绝望。"""object_detection/core/matcher.py"""class Match(object): """Class to store results from the matche
2017-12-14 22:33:33
3966
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人