update
This commit is contained in:
parent
5a98d2d33d
commit
4af428c63e
12
README.md
12
README.md
|
@ -14,4 +14,14 @@ A ADAS(Advanced Driver Assistance System) for Euro Truck Simulator 2 (or America
|
|||
1. Drivable Space Detection + Lane Detection + Object Detection (Perception)
|
||||
3. Automatic control system + Decision system (Behaviour)
|
||||
|
||||
## Datasets
|
||||
## Datasets
|
||||
|
||||
1. [BDD100K](https://doc.bdd100k.com/) - A diverse driving dataset for heterogeneous multitask learning
|
||||
- Multi-object Detection
|
||||
- Lane Detection
|
||||
- Drivable Area Segmentation
|
||||
2. [ETS2SCDataset](https://www.kaggle.com/datasets/vjekoslavdiklic/ets2sc) - Euro Truck Simulator 2 Captured Screen and Input
|
||||
- This dataset contains recorded screen of Euro Truck Simulator 2 and paired input from Steering wheel controller (Thrustmaster Ff430).
|
||||
- Dataset contains 323894 frames captured at 25fps.
|
||||
- Each frame is paired with steering wheel controller input values at that moment
|
||||
- Using [Europilot](https://github.com/marsauto/europilot)
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,63 @@
|
|||
import torch
|
||||
import torch.nn as nn
|
||||
import torch.nn.functional as F
|
||||
from torch.utils.data import Dataset, DataLoader
|
||||
|
||||
import torchvision
|
||||
import torchvision.utils as TU
|
||||
import torchvision.transforms.functional as TVTF
|
||||
|
||||
import os
|
||||
import cv2
|
||||
import math
|
||||
import timm
|
||||
import random
|
||||
import gitinfo
|
||||
import argparse
|
||||
import coloredlogs
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
from tqdm import tqdm
|
||||
from pathlib import Path
|
||||
from copy import deepcopy
|
||||
from skimage.draw import disk
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
import albumentations as Aug
|
||||
from albumentations.pytorch import ToTensorV2
|
||||
|
||||
|
||||
def use_device(GPU):
|
||||
if GPU is not None:
|
||||
if len(GPU) == 1:
|
||||
device = "cuda:{}".format(GPU[0])
|
||||
else:
|
||||
device = "cuda"
|
||||
else:
|
||||
device = "cpu"
|
||||
return device
|
||||
|
||||
def requires_grad(model, flag=True):
|
||||
for p in model.parameters():
|
||||
p.requires_grad = flag
|
||||
|
||||
def count_parameters(model):
|
||||
return sum(p.numel() for p in model.parameters() if p.requires_grad)
|
||||
|
||||
def tensor2im(tensor=None):
|
||||
output = tensor.mul(255).add_(0.5).clamp_(0, 255).permute(1, 2, 0).to('cpu', torch.uint8).numpy()
|
||||
return output
|
||||
|
||||
OBJ_LABELS = {
|
||||
'unlabeled':0, 'dynamic': 1, 'ego vehicle': 2, 'ground': 3,
|
||||
'static': 4, 'parking': 5, 'rail track': 6, 'road': 7,
|
||||
'sidewalk': 8, 'bridge': 9, 'building': 10, 'fence': 11,
|
||||
'garage': 12, 'guard rail': 13, 'tunnel': 14, 'wall': 15,
|
||||
'banner': 16, 'billboard': 17, 'lane divider': 18,'parking sign': 19,
|
||||
'pole': 20, 'polegroup': 21, 'street light': 22, 'traffic cone': 23,
|
||||
'traffic device': 24, 'traffic light': 25, 'traffic sign': 26, 'traffic sign frame': 27,
|
||||
'terrain': 28, 'vegetation': 29, 'sky': 30, 'person': 31,
|
||||
'rider': 32, 'bicycle': 33, 'bus': 34, 'car': 35,
|
||||
'caravan': 36, 'motorcycle': 37, 'trailer': 38, 'train': 39,
|
||||
'truck': 40
|
||||
}
|
Loading…
Reference in New Issue