Code Monkey home page Code Monkey logo

neurips2021-traffic4cast's People

Contributors

chenkins avatar moritz9 avatar roth-andreas 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

neurips2021-traffic4cast's Issues

How to run on gpu

from official usage, I used

export PYTHONPATH="$PYTHONPATH:$PWD"

DEVICE=cuda
DATA_RAW_PATH="./data/raw"
GROUND_TRUTH=""

python baselines/baselines_cli.py --model_str=unet          --limit=2 --epochs=1 --batch_size=1 --num_workers=1 --data_raw_path=$DATA_RAW_PATH --device=$DEVICE $GROUND_TRUTH

, but it causes

AssertionError: Torch not compiled with CUDA enabled

1gpu has set into this environment,
is this right usage?

Thanks,

Low-res static map masking

Hi!

Thank you for the provided data and the competition in general.

I was working on my pipeline and considering adding masked MSE metric into my validation part, however, when performing some sanity checks I encountered the following inconsistency:

I was assuming that when multiplying the ground truth maps of the 6 frames we are predicting with the mask of the provided low-resolution static map, the number of non-zeros in the resulting tensor shouldn't decrease compared to beforehand. Yet the result was the contrary, meaning that in the ground truth labeling, some non-zero elements lie outside the provided low-resolution static map.

Please see the following code snippet for reproducing:

from data.dataset.dataset import T4CDataset
from baselines.unet import UNetTransfomer
from metrics.masking import get_static_mask

from functools import partial

import numpy as np
import torch

BASE_FOLDER = ...
CITY = "CHICAGO"

dataset = T4CDataset(
    BASE_FOLDER, f"{CITY}/training/2019*8ch.h5",
    transform=partial(
        UNetTransfomer.unet_pre_transform,
        stack_channels_on_time=True,
        zeropad2d=None, batch_dim=False)
)

city_static_map = get_static_mask(CITY, BASE_FOLDER)
city_static_map_torch = torch.from_numpy(city_static_map[:, :, 0])

for index in range(len(dataset)):
    inp_frames, out_frames = dataset[index]

    nonzero_frames = torch.count_nonzero(out_frames)
    nonzero_frames_masked = torch.count_nonzero(out_frames * city_static_map_torch)

    print(nonzero_frames)
    print(nonzero_frames_masked)

    assert torch.allclose(nonzero_frames, nonzero_frames_masked)

Is this the expected behavior? Should we trust or use the low-resolution static map then?

OS X: AttributeError: 'svmem' object has no attribute 'buffers'

(t4c) $ python baselines/baselines_cli.py  
[2021-06-15 20:29:52,217][INFO][38382][baselines_cli.py:main:287] Start build dataset
[2021-06-15 20:29:52,217][INFO][38382][baselines_cli.py:main:294] Check if files need to be untarred...
[2021-06-15 20:29:52,252][INFO][38382][baselines_cli.py:main:305] Dataset has size 519360
[2021-06-15 20:29:52,252][INFO][38382][baselines_cli.py:main:309] Create train_model.
[2021-06-15 20:29:52,407][INFO][38382][baselines_cli.py:main:323] Going to run train_model.
Traceback (most recent call last):
  File "baselines/baselines_cli.py", line 361, in <module>
    main(sys.argv[1:])
  File "baselines/baselines_cli.py", line 324, in main
    logging.info(system_status())
  File "/Users/che/workspaces/neurips2021-traffic4cast/util/monitoring.py", line 49, in system_status
    s += tabulate([[str(mem.__getattribute__(a)) for a in virtual_memory_fields]], headers=virtual_memory_fields) + "\n"
  File "/Users/che/workspaces/neurips2021-traffic4cast/util/monitoring.py", line 49, in <listcomp>
    s += tabulate([[str(mem.__getattribute__(a)) for a in virtual_memory_fields]], headers=virtual_memory_fields) + "\n"
AttributeError: 'svmem' object has no attribute 'buffers'

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.