Coder Social home page Coder Social logo

pytorch-lightning-yolox's People

Contributors

iywie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pytorch-lightning-yolox's Issues

TypeError: unhashable type: 'list' (COCO dataset) and Accuracy(MAP) issue

Hello. I am very thankful for your contribution to the ML world. While using your repo after clone, I found some issues related to COCO format and accuracy.

  1. COCO dataset.
    I downloaded coco2017 dataset and run trainer.py but error encountered. The output is like below.
    Global seed set to 42
    GPU available: True (cuda), used: True
    TPU available: False, using: 0 TPU cores
    IPU available: False, using: 0 IPUs
    HPU available: False, using: 0 HPUs
    Global seed set to 96
    LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0,1,2,3]
    Loading train_dataloader to estimate number of stepping batches.

| Name | Type | Params

0 | model | OneStageD | 47.7 M

47.7 M Trainable params
0 Non-trainable params
47.7 M Total params
190.794 Total estimated model params size (MB)
/venv/lib/python3.8/site-packages/pytorch_lightning/loggers/tensorboard.py:261: UserWarning: Could not log computational graph to TensorBoard: The model.example_input_array attribute is not set or input_array was not given.
rank_zero_warn(
Sanity Checking DataLoader 0: 0%| | 0/2 [00:00<?, ?it/s]length of prediction[0] 25200
Sanity Checking DataLoader 0: 50%|███████▌ | 1/2 [00:00<00:00, 1.05it/s]length of prediction[0] 25200
Sanity Checking DataLoader 0: 100%|███████████████| 2/2 [00:01<00:00, 1.48it/s]Traceback (most recent call last):
File "trainer/model_trainer.py", line 91, in
train(epochs=300, batches=10, training_type="detection", model_name="yolo", n_classes=2,
File "trainer/model_trainer.py", line 82, in train
trainer.fit(model=lightning_model, datamodule=data_module)
File "/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 603, in fit
call._call_and_handle_interrupt(
File "/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/call.py", line 38, in _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)
File "/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 645, in _fit_impl
self._run(model, ckpt_path=self.ckpt_path)
File "/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1098, in _run
results = self._run_stage()
File "/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1177, in _run_stage
self._run_train()
File "/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1190, in _run_train
self._run_sanity_check()
File "/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1262, in _run_sanity_check
val_loop.run()
File "/venv/lib/python3.8/site-packages/pytorch_lightning/loops/loop.py", line 206, in run
output = self.on_run_end()
File "/venv/lib/python3.8/site-packages/pytorch_lightning/loops/dataloader/evaluation_loop.py", line 180, in on_run_end
self._evaluation_epoch_end(self._outputs)
File "/venv/lib/python3.8/site-packages/pytorch_lightning/loops/dataloader/evaluation_loop.py", line 288, in _evaluation_epoch_end
self.trainer._call_lightning_module_hook(hook_name, output_or_outputs)
File "/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1342, in _call_lightning_module_hook
output = fn(*args, **kwargs)
File "/trainer/detection/coco_yolo.py", line 89, in validation_epoch_end
ap50_95, ap50, summary = COCOEvaluator(json_list, self.trainer.datamodule.dataset_val)
File "/models/evaluators/eval_coco.py", line 24, in COCOEvaluator
cocoDt = cocoGt.loadRes(tmp)
File "/models/data/datasets/pycocotools/coco.py", line 340, in loadRes
assert set(annsImgIds) == (set(annsImgIds) & set(self.getImgIds())),
TypeError: unhashable type: 'list'

  1. Accuracy (MAP)
    My second concern is to evaluate accuracy of the model. To evaluate model, I think, I need some indicators like loss and accuracy.
    Here, I can see the parts that indicate the MAP. however, when I try to use custom dataset rather than coco dataset like coco2017, I have no idea how to calculate the MAP using lightning. The outputs of the data pre-processing is relatively complicated and less understandable to modify so I hope your help for this....

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.