Git Product home page Git Product logo

dmpr-ps's People

Contributors

teoge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dmpr-ps's Issues

About the results in ps2.0

Hi, Teoge!

Thanks for your contribution about parking slot, I'm appreciated for it. But I have an question about your result:

The paper said the result of DMPR has recalls of 99.37% and precisions of 99.42%, But I test you released pre-trained weights only achieved the recalls of 49.6% and precisions of 99.5%, the evaluation in code I used:

==================================================================
precisions, recalls = util.calc_precision_recall(ground_truths_list, predictions_list, match_slots)
print(np.mean(precisions), np.mean(recalls))

So, What can I do to re-implement the result about your paper said?

pytorch版本

我用的pytorch1.7版本测试,出现的上述问题,不知道应该怎么解决,

数据集问题

visdom_image(2)
您好上面图片中展示的是我自己用摄像头拍摄的照片再模型中的可视化结果,是因为我用摄像头拍摄图片中的停车位是斜的导致出现这样的结果?您对解决这种情况有什么好的idea呢?
是要拍摄图片重新训练得到自己的训练权重还是说我将摄像头置于图像上方拍垂直的图片呢?
期待您的回信,万分感谢!!!

Exception in train.py - Can't pickle local object 'train_detector.<locals>.<lambda>

Hello @Teoge,
first of all, thank you for sharing your research together with your code here!

I tried to execute your code and the inference ran flawlessly. Unfortunately, the training is not running due to the following error at location

DMPR-PS/train.py

Lines 73 to 79 in 88b77e3

data_loader = DataLoader(data.ParkingSlotDataset(args.dataset_directory),
batch_size=args.batch_size, shuffle=True,
num_workers=args.data_loading_workers,
collate_fn=lambda x: list(zip(*x)))
for epoch_idx in range(args.num_epochs):
for iter_idx, (images, marking_points) in enumerate(data_loader):

Exception has occurred: AttributeError Can't pickle local object 'train_detector.<locals>.<lambda>'
This issue is seems to be a result of the lambda function being called in the DataLoader.

I executed your code with python 3.7.0 and torch 1.7.0.

I would appreciate any hint you have for me :)

Best,
Johannes

model training

Hi , Teoge. I want to train it use n(n>1) GPUS? if , need to change the code.

感谢大佬开源,我结合论文和代码看了一下有一点疑问

process.py中有pair_marking_points函数,这其中我枚举了一下是有以下12种情况能够返回1或者-1,进而组成slot:

  • 返回1的情况:
    • 当point_a的形状是t_up或者l_up,同时point_b的形状为t_down或者l_down -> 4种
    • 当point_a的形状是t_middle,且point_b的形状为t_down或者l_down -> 2种
  • 返回-1的情况:
    • 当point_a的形状是为t_down或者l_down,同时point_b的形状是t_up或者l_up -> 4种
    • 当point_a的形状是t_middle,且point_b的形状是t_up或者l_up -> 2种

但是看一些解读以及论文中的Fig.5看确实有16种组合情况。请问下是我在哪里遗漏了吗?

def pair_marking_points(point_a, point_b):
"""See whether two marking points form a slot."""
vector_ab = np.array([point_b.x - point_a.x, point_b.y - point_a.y])
vector_ab = vector_ab / np.linalg.norm(vector_ab)
point_shape_a = detemine_point_shape(point_a, vector_ab)
point_shape_b = detemine_point_shape(point_b, -vector_ab)
if point_shape_a.value == 0 or point_shape_b.value == 0:
return 0
if point_shape_a.value == 3 and point_shape_b.value == 3:
return 0
if point_shape_a.value > 3 and point_shape_b.value > 3:
return 0
if point_shape_a.value < 3 and point_shape_b.value < 3:
return 0
if point_shape_a.value != 3:
if point_shape_a.value > 3:
return 1
if point_shape_a.value < 3:
return -1
if point_shape_a.value == 3:
if point_shape_b.value < 3:
return 1
if point_shape_b.value > 3:
return -1

关于10个像素的阈值问题

您好,非常感谢您的工作,在阅读论文和源码的时候,我存在一些疑惑:

  1. 在论文中指出判断检测的点对是否匹配使用的是计算两个点的二范数距离,如果小于10那么就说明点是配对的,如下图所示:
    image
    但是在源码里是这样写的,这里的squared_dist1squared_dist2是否应该开方之后再去和这个阈值比较才是符合论文中公式的描述呢?
    image

关于论文的几点疑问

作者您好,
1、请问符合条件(距离阈值,中间没有穿过第三个marking-point)的两个marking-point,各自怎么对应Fig. 5中的五种marking-point
2、T形状和L形状的marking-point确定了方向后,对停车位推断有何帮助?

Training model with addition of new parking slot type

Hello Teoge,

I want to add on more type of OPEN Slot parking type, following steps done

  1. Labelled new type of Open SLOT Type with index number "2"....
    Now "0"---> for T Slot, "1"--->for L Shaped and "2"--->Open SLot.
  2. Prepared dataset as per your code recommendations.
  3. Trained the model, with above dataset for 20EPOCHS and finally model got trained.
  4. Now during inference, observed that the marking_points.shape value,
    For L-Shaped and Open Shaped value greater then (>) 0.5
    T-Shaped value is very less i.e. less then 0.5

I'm unable to differentiate the shapes between L and Open Shape parking slots.
I kindly request you to provide information, how to differentiate between the shape types from model, do we need to change config parameter during training itself so that we get different shape values for different parking shapes.

I request you to provide some information for above regards.

Thanks,
Anil.

图片大小

你好,
图片大小有什么限制吗,一定要resize到512吗?
代码centralied_marks[:, 0:4] -= 300.5含义是什么?

about annotation tool

Excuse me! I annotated the parking slot marking according to the marking tools, but the result is not same as your provided. The difference is that yours have the direction and the type of parking slot marking point, but i only have the coordinate of marking point. If i need to calculate the orientation of that? or how do you get it through the annotation tool?
Thanks, Teoge.
yifei

average_precision = 0

我用训练好的权重文件去预测,得到的averaget_precision都是0,这是什么原因

复现代码的时候出现bug,

在运行readme.md文件中的evaluate.py时,出现问题

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

之前的准备和扩充数据集是没有问题的,到了评估阶段出现这个问题,想问一下作者,这个是什么原因导致的?

How to generate the json file?

Thanks for your work!
I wonder to know how to generate the json label file?
I notice that the marks parameters in json label files are added 2 value relative to the .mat label file. What are those parameters mean and how to calculate this extra parameters?
Looking forward for your response.

Abnormal model training

image

Follow your approach to PS2 0 data set, the training set and test set obtained, and the weight file obtained after training are used for parking point detection and evaluation. The evaluation data of parking point detection is shown in the figure below:
image

In addition, the same data set is tested, and the weight file is modified to the author's. The evaluation data are as follows:
image

The effect given in the original paper is

image
So you need to explain to me why this happens? Or is there something wrong with my experiment?

数据拓展方面的问题

您好,请问用监控摄像头里的图片制作数据集从而代替AVM环视图以及PS2.0的数据集,然而我发现我这样提取出来的图片不是垂直的停车位,这样的话用您的标注工具手动输入一些信息的话,能用您这个网络训练吗?
或者说我现在将摄像头仅仅垂直的放在若干个停车位的上方,这样的话采集过来的图片能用该网络跑吗?

标注问题

您好, 我在使用您给的标注工具游览PS2.0数据集的时候发先了一个问题,就是对于左右两边的停车位来说,其中L型的标记点只能朝向一个方向,这样就会导致对于部分实际的L型标记点与标注的相反,这个问题改怎么解决呢,我尝试了一下没办法改变L型的方向,期待您的回复!
ps2 0

What does "masks" in the json file contain?

Hello, I noticed the line 56 of prepare_dataset.py "generalized_marks.append([xval, yval, direction, mark[4]])" . How do I generate the current json format file from the original mat file?

感谢大佬的开源,有几个问题想请教下

1、判断两点之间是否有第三点的代码看懂了,但是这么做的原理是什么没想明白,虽然我验证了几组数据这么做是对的。代码在process.py的pass_through_third_point函数
2、struct.py的detemine_point_shape函数,我从代码里读的意思是根据角点倾斜角和两点的倾斜角差来判断角点的类型,但是config里的两个ANGLE_DIFF取值我有点不太懂,请问这块的原理依据是什么呢。

About the config parameter?

Hello Teoge,

I want to use my data training the model, but I do not understand the parameter in the config.py, how to calculate?
the parameter:

Threshold used to filter marking points too close to image boundary

BOUNDARY_THRESH = 0.05##=3 pixel in 512 or 600????

Thresholds to determine whether an detected point match ground truth.

SQUARED_DISTANCE_THRESH = 0.000277778 #????????,paper is 10 pixel,but not, whether in 512 or 600.
DIRECTION_ANGLE_THRESH = 0.5235987755982988 # 30 degree in rad in paper

###?what stand by and how to calculate?
VSLOT_MIN_DIST = 0.044771278151623496 #????
VSLOT_MAX_DIST = 0.1099427457599304#?????
HSLOT_MIN_DIST = 0.15057789144568634#?????
HSLOT_MAX_DIST = 0.44449496544202816#?????

####what stand by and how to calculate?
SHORT_SEPARATOR_LENGTH = 0.199519231##?????
LONG_SEPARATOR_LENGTH = 0.46875##?????

angle_prediction_error = 0.1384059287593468 collected from evaluate.py, but what do the BRIDGE_ANGLE_DIFF and SEPARATOR_ANGLE_DIFF stand by and how to calculate????

BRIDGE_ANGLE_DIFF = 0.09757113548987695 + 0.1384059287593468 #0.09757113548987695-->5.59
SEPARATOR_ANGLE_DIFF = 0.284967562063968 + 0.1384059287593468 #0.284967562063968-->16.32, 0.1384059287593468-->7.93 degree to rad

I request you to provide some information for above regards.

Thanks,
Shuai.

can‘t display the plot of parking slots on the image

Hello Teoge
Thanks for your code.
When I took the step of inference,I found that the plot of marking points on the image can display.However,it can‘t display the plot of parking slots on the image.So i write you here for help to slove this problem.

感谢大佬开源,我仔细阅读了论文和项目代码,有几个问题想请教一下

1、判断两点之间是否有第三点的代码看懂了,但是这么做的原理是什么没想明白,虽然我验证了几组数据这么做是对的。代码在process.py的pass_through_third_point函数
2、struct.py的detemine_point_shape函数,我从代码里读的意思是根据角点倾斜角和两点的倾斜角差来判断角点的类型,但是config里的两个ANGLE_DIFF取值我有点不太懂,请问这块的原理依据是什么呢。

数据标注问题(续)

您好,您给的label标注是没问题的,为什么用您给的标注工具自己标注的时候,可视化出来的L型标记点和实际的L型方向会出现相反的情况,这个是需要自己在您那个工具上写脚本吗?还是因为我使用的方式不对呢?
示例
如上图,在标注L型4的时候没办法改变4的朝向,然而生成的label标签内shape位置写的是1,就是可视化出来的是这种,您在标注过程中有遇到类似问题吗?这该怎么解决呢?
期待您的回复,谢谢!

数据集先验值

您好,能请问您代码里config.py里的先验值SHORT_SEPARATOR_LENGTH = 0.199519231、
LONG_SEPARATOR_LENGTH = 0.46875是如何得到的吗?

Would this algorithm work if we add an output to detect other types of parking spaces?

Hello, I am interested in working with this algorithm, however, the parking spaces I want to detect do not correspond to either the L or T type. In fact, the parking spaces I want to detect are rather straight lines that do not have significant intersections. I would like to know why this case has not been considered in your algorithm. If I add an output to the network to classify this new type of parking space, taking into account annotation and inference, do you think it could work?

About the 3rd and 4th value of 'marks'.

Hi Teoge, what is the meaning of the 3rd and 4th value of a single vector in 'marks'. The json file describes the 'mark' as {x,y,coordinate,direction,type}, and in the paper {x,y,s,theta}. So the 3rd and 4th value form a vector that describe the direction vector theta?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.