Giter VIP home page Giter VIP logo

Comments (7)

lucastabelini avatar lucastabelini commented on July 17, 2024

There's an explanation on how to test the model on your own dataset in #2 .

As for the visualization, if you press any key when the image window is focused it will show the next image.

from polylanenet.

NSVR57 avatar NSVR57 commented on July 17, 2024

Hi Tried like this

!pythontest.py --exp_name tusimple --cfg /content/PolyLaneNet/cfgs/testconfig.yml --epoch 2695
But getting the following error

traceback (most recent call last):
File "test.py", line 141, in
test_dataset = cfg.get_dataset("test")
File "/content/PolyLaneNet/lib/config.py", line 23, in get_dataset
self.config['datasets'][split]['type'])(**self.config['datasets'][split]['parameters'])
KeyError: 'test'

from polylanenet.

lucastabelini avatar lucastabelini commented on July 17, 2024

The testconfig.yaml you created is missing the test dataset information. If you show its contents I might be able to help.

from polylanenet.

NSVR57 avatar NSVR57 commented on July 17, 2024

this is my textconfig.yaml

# Training settings
seed: 0
exps_dir: 'experiments'
iter_log_interval: 1
iter_time_window: 100
model_save_interval: 1
backup:
model:
  name: PolyRegression
  parameters:
    num_outputs: 35 # (5 lanes) * (1 conf + 2 (upper & lower) + 4 poly coeffs)
    pretrained: true
    backbone: 'resnet50'
    pred_category: false
    curriculum_steps: [0, 0, 0, 0]
loss_parameters:
  conf_weight: 1
  lower_weight: 1
  upper_weight: 1
  cls_weight: 0
  poly_weight: 300
batch_size: 16
epochs: 2695
optimizer:
  name: Adam
  parameters:
    lr: 3.0e-4
lr_scheduler:
  name: CosineAnnealingLR
  parameters:
    T_max: 385

# Testing settings
test_parameters:
  conf_threshold: 0.5

# Dataset settings
datasets:
  train:
    type: LaneDataset
    parameters:
      dataset: tusimple
      split: train
      img_size: [360, 640]
      normalize: true
      aug_chance: 0.9090909090909091 # 10/11
      augmentations:
       - name: Affine
         parameters:
           rotate: !!python/tuple [-10, 10]
       - name: HorizontalFlip
         parameters:
           p: 0.5
       - name: CropToFixedSize
         parameters:
           width: 1152
           height: 648
      root: "/dados/tabelini/datasets/tusimple"

test: &test
    type: LaneDataset
    parameters:
      dataset: nolabel_dataset
      normalize: true # Wheter to normalize the input data. Use the same value used in the pretrained model (all pretrained models that I provided used normalization, so you should leave it as it is)
      augmentations: [] # List of augmentations. You probably want to leave this empty for testing
      img_h: 360 # The height of your test images (they shoud all have the same size)
      img_w: 640 # The width of your test images
      img_size: [360, 640] # Yeah, this parameter is duplicated for some reason, will fix this when I get time (feel free to open a pull request :))
      max_lanes: 5 # Same number used in the pretrained model. If you use a model pretrained on TuSimple (most likely case), you'll use 5 here
      root:  "/home/ubuntu/" # Path to the directory containing your test images. The loader will look recursively for image files in this directory
      img_ext: ".jpeg" # Test images extension (e.g., .png, .jpg)"

  # val = test
val:
  <<: *test
``

from polylanenet.

lucastabelini avatar lucastabelini commented on July 17, 2024

The test key seems to be at the same level of indentation as datasets, but it should be at the same level as train (train and test are keys inside datasets).

from polylanenet.

NSVR57 avatar NSVR57 commented on July 17, 2024

Thanks, That worked. do we have any config example where we can pass a video instead of pics

from polylanenet.

lucastabelini avatar lucastabelini commented on July 17, 2024

No. What you can do is extract the frames from the video and pass to the network, using tools such as ffmpeg.

from polylanenet.

Related Issues (20)

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.