Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about prepare MGL dataset #46

Open
oWWWo3324 opened this issue Feb 19, 2024 · 7 comments
Open

Question about prepare MGL dataset #46

oWWWo3324 opened this issue Feb 19, 2024 · 7 comments

Comments

@oWWWo3324
Copy link

When attempting to download the MGL dataset using the command python -m maploc.data.mapillary.prepare --token $YOUR_ACCESS_TOKEN, the program does not respond.How can I fix it?

(py38) net@ubuntu:~/Desktop/catkin_ws/ori_ws/OrienterNet$ python -m maploc.data.mapillary.prepare --token .....
[2024-02-19 00:45:41 maploc INFO] Starting processing for location sanfrancisco_soma.
[2024-02-19 00:45:41 maploc INFO] Fetching metadata for all images.
0%| | 0/41861 [00:00<?, ?it/s]

2

But data can be successfully obtained using the following method in the same network environment.
微信图片_20240219165858

@oWWWo3324
Copy link
Author

The issue has been identified as occurring during the execution of r = await self.client.get(url) within maploc.data.mapillary.download.py.

@sarlinpe
Copy link
Collaborator

Thank you for reporting this issue. With 41d2f9d we introduced a 2-minute timeout. Is any error shown after 2 min? Can you revert this commit and share the result?

@oWWWo3324
Copy link
Author

This code is already in the project, but the program still has no response or error after running for more than two minutes.
3

@yicocc
Copy link

yicocc commented Jul 31, 2024

This code is already in the project, but the program still has no response or error after running for more than two minutes. 3

I wanna ask you for the same question ,my token didn't download the MGL dataset ,but I didn't this reason,so I can‘t trian this model

@xiaofeifei-1
Copy link

xiaofeifei-1 commented Aug 15, 2024

下载mapillary数据集,运行命令:python -m maploc.data.mapillary.prepare
中国大陆的同学打开VPN的同时,通过设置VPN的python代码两处代码如下:

# downloader = MapillaryDownloader(token)   # 实例化
# -------------------------修改--------------------------
# 设定代理 URL, 设置成功;否则无法下载
proxy_url = 'http://127.0.0.1:7890' 
downloader = MapillaryDownloader(token, proxy_url=proxy_url)
# -------------------------修改--------------------------
```
def __init__(self, token: str, proxy_url: str = None):
# def __init__(self, token: str):
    # self.token = token
    # self.client = httpx.AsyncClient(
    #     transport=httpx.AsyncHTTPTransport(retries=20), timeout=120.0
    # )
    # self.limiter = AsyncLimiter(self.max_requests_per_minute // 2, time_period=60)
    # ---------------------------修改如下----------------------------
    self.token = token
    self.proxy_url = proxy_url
    transport = httpx.AsyncHTTPTransport(retries=20)
    if proxy_url:
        self.client = httpx.AsyncClient(
            transport=transport,
            timeout=120.0,
            proxies={
                "http://": proxy_url,
                "https://": proxy_url,
            }
        )
    else:
        self.client = httpx.AsyncClient(
            transport=transport,
            timeout=120.0
        )
    self.limiter = AsyncLimiter(self.max_requests_per_minute // 2, time_period=60)

    # ---------------------------修改如下----------------------------

@yicocc
Copy link

yicocc commented Aug 15, 2024

下载mapillary数据集,运行命令:python -m maploc.data.mapillary.prepare 中国大陆的同学打开VPN的同时,通过设置VPN的python代码两处代码如下:

# downloader = MapillaryDownloader(token)   # 实例化
# -------------------------修改--------------------------
# 设定代理 URL, 设置成功;否则无法下载
proxy_url = 'http://127.0.0.1:7890' 
downloader = MapillaryDownloader(token, proxy_url=proxy_url)
# -------------------------修改--------------------------

def init(self, token: str, proxy_url: str = None):

def init(self, token: str):

# self.token = token
# self.client = httpx.AsyncClient(
#     transport=httpx.AsyncHTTPTransport(retries=20), timeout=120.0
# )
# self.limiter = AsyncLimiter(self.max_requests_per_minute // 2, time_period=60)
# ---------------------------修改如下----------------------------
self.token = token
self.proxy_url = proxy_url
transport = httpx.AsyncHTTPTransport(retries=20)
if proxy_url:
    self.client = httpx.AsyncClient(
        transport=transport,
        timeout=120.0,
        proxies={
            "http://": proxy_url,
            "https://": proxy_url,
        }
    )
else:
    self.client = httpx.AsyncClient(
        transport=transport,
        timeout=120.0
    )
self.limiter = AsyncLimiter(self.max_requests_per_minute // 2, time_period=60)

# ---------------------------修改如下----------------------------

Thanks,but I still can‘t run sucessfully ,could you help me provide the whole code,thanks again。

@sarlinpe
Copy link
Collaborator

Can you provide more details on the error message? Does it just hang?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants