Spatial

Why does rasterToPoints generate an error on first call but not second?

两盒软妹~` 提交于 2021-02-08 07:32:09
问题 I have some code that loops over a list of study IDs ( ids ) and turns them into separate polygons/spatial points. On the first execution of the loop it produces the following error: Error in (function (x) : attempt to apply non-function This is from the raster::rasterToPoints function. I've looked at the examples in the help section for this function and passing fun=NULL seems to be an acceptable method (filters out all NA values). All the values are equal to 1 anyways so I tried passing a

Draw a parallel line in R offset from a line

隐身守侯 提交于 2021-02-07 06:23:06
问题 I have linestring which represent a driving journey down some streets. But I want to actually represent a cyclists journey, which is offset from the line i.e. they travel near the kerb of the road. I'm struggling with how to do it. I've made a reproducible piece of R code to illustrate. ## Let's say I have a route along some streets. library(ggplot2) ## It can be described by this data <- data.frame(x = c(1,3,10,5,0,5), y = c(1,3,1,0,5,7), label = c('a', 'b', 'c', 'd', 'e', 'f')) ##

Need a standalone Java library for performing spatial calculations on lat/lon data [closed]

試著忘記壹切 提交于 2021-02-05 20:04:44
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Improve this question I'm looking for a Java library that is capable of performing spatial calculations on sets of lat/lon data. Here are some of the functions that I'm looking for: Calculate the Great Circle distance between two points Determine if a point lies within a simple closed

R Assigning x or y coordinate to cells of a raster to perform calculations

大憨熊 提交于 2021-02-05 06:35:29
问题 Is there any solution to assign to assign X or Y coordinate to all of the cells of a raster image using R? For example, suppose I have a raster with 3x3 cells. The lower left coordinate is X=7,Y=15 (in meters), and resolution is +10 m for both, X and Y direction (X increases rightward, and Y upward). Then, I would like to generate raster surfaces where each cell has the X and Y value, like these ones: X raster 7 17 27 7 17 27 7 17 27 Y surface 35 35 35 25 25 25 15 15 15 UPDATE: this is the

R Assigning x or y coordinate to cells of a raster to perform calculations

女生的网名这么多〃 提交于 2021-02-05 06:35:13
问题 Is there any solution to assign to assign X or Y coordinate to all of the cells of a raster image using R? For example, suppose I have a raster with 3x3 cells. The lower left coordinate is X=7,Y=15 (in meters), and resolution is +10 m for both, X and Y direction (X increases rightward, and Y upward). Then, I would like to generate raster surfaces where each cell has the X and Y value, like these ones: X raster 7 17 27 7 17 27 7 17 27 Y surface 35 35 35 25 25 25 15 15 15 UPDATE: this is the

Merge by lat/lon in R [duplicate]

*爱你&永不变心* 提交于 2021-02-04 21:45:25
问题 This question already has answers here : Geographic / geospatial distance between 2 lists of lat/lon points (coordinates) (3 answers) Closed 4 years ago . My question is similar to Merging two data frames, both with coordinates based on the closest location. I would like to merge two dataframes in R by latitude and longitude: Dataframe 1 structure(list(lat = c(54L, 55L, 51L, 54L, 53L, 50L, 47L, 51L, 49L, 54L), lon = c(14L, 8L, 15L, 7L, 6L, 5L, 13L, 5L, 13L, 11L ), PPP2000_40 = c(4606, 6575,

深度 | 线下场景的客流数字化探索与应用

怎甘沉沦 提交于 2021-02-04 19:33:33
阿里妹导读:数字化的时代,无论是商场里的大小专柜,还是小区门口的便利店,大多仍处于“数据荒漠”中。店家不知道店内多少商品被人浏览,多少衣服被试穿了,作为顾客的我们也不知道哪些商品是最受同龄人喜爱的畅销好物。 在新零售场景中,线下的行为数据是潜藏的宝矿。如何进行数字化升级,更好辅佐商家和消费者,成为摆在我们眼前的重要课题。 下面,搜索事业部的算法专家京五将为大家详细介绍阿里在线下场景的客流数字化探索与应用。 在互联网时代,数据是所有应用的基础,淘宝的商家可以基于商品历史的点击成交量来判断店内各个商品的情况,并做出相应的运营行为,淘宝的买家会根据商品历史的成交数据,评论数据等,来辅助自己判断是否进行购买,同时我们平台也会基于用户和商品的历史数据,来训练模型,预测各个商品的点击率,预测各个用户的偏好,使展示的结果更符合用户的需求。可以看出,数据对于各个不同的角色都有很重要的作用。 在互联网中,获取数据相对容易,反观线下零售场景,大部分数据都是缺失的,商家并不知道店内多少商品被浏览了,多少商品被试穿了,买家也不知道各件商品的历史数据。 因此,我们的客流数字化相关的探索,就是要将线下的用户和商品的行为数据收集起来,让线下的行为也能有迹可循,为商业决策和市场运营提供准确有效的数据支撑,将传统零售中的导购经验逐渐数字化成可量化和统计的数字指标,能够辅助商家运营,同时帮助用户进行决策。基于这些数据

计算机视觉中的注意力机制

给你一囗甜甜゛ 提交于 2021-02-02 21:57:10
点击上方 “ 机器学习与生成对抗网络 ”,关注"星标" 获取有趣、好玩的前沿干货! 作者:HUST小菜鸡 https://zhuanlan.zhihu.com/p/146130215 文仅交流,未经允许不得转载 之前在看DETR这篇论文中的self_attention,然后结合之前实验室组会经常提起的注意力机制,所以本周时间对注意力机制进行了相关的梳理,以及相关的源码阅读了解其实现的机制 一、注意力机制(attention mechanism) attention机制可以它认为是一种资源分配的机制,可以理解为对于原本平均分配的资源根据attention对象的重要程度重新分配资源,重要的单位就多分一点,不重要或者不好的单位就少分一点,在深度神经网络的结构设计中,attention所要分配的资源基本上就是权重了 视觉注意力分为几种,核心思想是基于原有的数据找到其之间的关联性,然后突出其某些重要特征,有通道注意力,像素注意力,多阶注意力等,也有把NLP中的自注意力引入。 二、自注意力(self-attention) 参考文献:Attention is All you Need 参考资料:https://zhuanlan.zhihu.com/p/48508221 GitHub:https://github.com/huggingface/transformers

MyDLNote-High-Resolution: gOctConv:100K参数实现高效显著性目标检测

一笑奈何 提交于 2021-02-01 09:11:49
Highly Efficient Salient Object Detection with 100K Parameters [ ECCV 2020 ] [ Code ] Abstract Salient object detection models often demand a considerable amount of computation cost to make precise prediction for each pixel, making them hardly applicable on low-power devices. In this paper, we aim to relieve the contradiction between computation cost and model performance by improving the network efficiency to a higher degree. We propose a flexible convolutional module, namely generalized OctConv (gOctConv) , to efficiently utilize both in-stage and cross-stages multi-scale features, while

使用多尺度空间注意力的语义分割方法

大憨熊 提交于 2021-01-30 09:37:33
点击上方“AI公园”,关注公众号,选择加“星标“或“置顶” 作者: Abhinav Sagar 编译:ronghuaiyang 导读 用于自动驾驶的新的state of the art的网络。 本文提出了一种新的神经网络,利用不同尺度的多尺度特征融合来实现精确高效的语义分割。 重点 我们在下采样部分使用了膨胀卷积层,在上采样部分使用了转置卷积层,并在concat层中对它们进行拼接。 alternate blocks之间有跳跃连接,这有助于减少过拟合。 我们对我们的网络训练和优化细节进行了深入的理论分析。 我们在Camvid数据集上使用每个类的平均精度和IOU作为评价指标来评估我们的网络。 我们的模型在语义分割上优于之前的state of the art网络,在超过100帧每秒的速度下,平均IOU值为74.12。 语义分割 语义分割需要对输入图像的每个像素预测一个类,而不是对整个输入图像进行分类。为了预测图像中每个像素的内容,分割不仅需要找到输入图像中的内容,还需要找到它的位置。语义分割在自动驾驶、视频监控、医学影像等方面都有应用。这是一个具有挑战性的问题,因为要在准确性和速度之间进行权衡。由于模型最终需要在现实环境中部署,因此精度和速度都应该很高。 数据集 在训练和评估中使用了CamVid数据集。数据集提供了ground truth标签,将每个像素与32个类中的一个相关联