- 博客(12)
- 资源 (1)
- 收藏
- 关注
原创 使用CNN进行ROI提取(优化代码篇)
昨天写了一个使用CNN检测MRI图片心室的感兴趣区域,输入为512*512,输出为100*100的ROI。在这里的检验指标我是用的是DICE Index,公式如下,其中A指自动分割区域,M是专家已经标记好的ground truth。因为此前是用传统方法进行ROI提取(主要是通过canny边缘检测和霍夫圆形检测),以及使用中心区域直接提取的方法,在这里一并进行比较。 ...
2018-06-14 16:02:13 5119 1
原创 242. Valid Anagram(Python3)
Given two strings s and t , write a function to determine if t is an anagram of s.Example 1:Input: s = "anagram", t = "nagaram"Output: trueExample 2:Input: s = "rat", t = "car"Output: false构建哈希表就可以...
2018-06-12 19:04:26 295
原创 237. Delete Node in a Linked List(Python3)
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Given linked list -- head = [4,5,1,9], which looks like following: 4 -> 5 -> 1 ->...
2018-06-12 18:32:59 212
原创 235. Lowest Common Ancestor of a Binary Search Tree (Python3)
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between tw...
2018-06-12 18:25:14 284
原创 205. Isomorphic Strings [easy] Python3 C++
Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replaced with another char...
2018-05-02 18:41:27 144
原创 204. Count Primes [easy] Python3和C++
Count the number of prime numbers less than a non-negative number, n.寻找n以内的素数个数。解法一最笨的方法是遍历到n,逐个判断,Python3代码如下:class Solution: def isPrime(self, a): if a <=1: retu...
2018-05-01 19:14:17 162
原创 136. Single Number [medium] Python3
Given an array of integers, every element appears twice except for one. Find that single one.Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra me...
2018-03-10 20:21:42 162
原创 125. Valid Palindrome Python3
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrome."race a car" is not a palindro...
2018-03-10 20:03:39 185
原创 122. Best Time to Buy and Sell Stock II Python3
Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one an...
2018-03-10 19:52:43 204
原创 面试题3:数组中重复的数字
lis = [2,1,3,4,3]def f(lis): for index in range(len(lis)): while index != lis[index]: if lis[index] == lis[lis[index]]: print(lis[index]) break...
2018-03-09 21:54:35 165
原创 121. Best Time to Buy and Sell Stock Python3
Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), des...
2018-03-09 15:33:54 271
原创 119. Pascal's Triangle II Python
Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to use only O(k) extra space?给定k,返回第k行的杨辉三角,最好使用O(k)的空间复杂...
2018-03-09 15:20:47 257
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人