-
Notifications
You must be signed in to change notification settings - Fork 9
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
Running Colab code does not give output. #4
Comments
@samjoy What was your IOU score? If it's low you need to set threshold to be low. |
Ok I am running your code once more. The dataset you you used in the demo is in Pascal XML VOC format right? |
Ok my AP is 0 when running the demo. Any idea why? |
Can you give me a link to the colab notebook ? |
I mean I did nothing but run your notebook directly. No change |
Wait let me check I think I made some changes to the API but forget to update the notebook |
Did you change these ? # INSTANTIATE LIGHTNING-TRAINER with CALLBACKS :
# ============================================================ #
# NOTE:
# For a list of whole trainer specific arguments see :
# https://pytorch-lightning.readthedocs.io/en/latest/trainer.html
lr_logger = LearningRateMonitor(logging_interval="step")
early_stop = EarlyStopping(mode="min", monitor="val_loss", patience=8, )
#instantiate LightningTrainer
trainer = Trainer(precision=16, gpus=1, callbacks=[lr_logger, early_stop], max_epochs=50, weights_summary="full", ) |
Whats your loss ? |
I did make one change. Instead of litModel = RetinaNetModel(hparams=hparams), i used litModel = RetinaNetModel(hparams) |
The loss is 5.2 |
That's okay I changes the name of the argument to save colab as github gist and give me the link .... I wil get back to you |
5.2 after how many epochs ? It's too high... |
In 10 epochs with early stopping |
I am now running without early stopping but max epochs=50 |
I am using Pascal XML VOC format from roboflow. |
I just ran it again without early stopping but max_epochs = 50 , I am getting loss of 5.28. |
Mine loss if less than 2 even in 1 epoch same basic params. Let it train for some more ill share the gist |
Are you using the BCCD dataset in the Pascal VOC XML format? |
Yes |
So i did a bit of tunning my optimizer config looks like this now hparams.optimizer = {
"class_name": "torch.optim.SGD",
"params" : {"lr": 0.005, "weight_decay": 0.0001, "momentum":0.9},
} Current epoch 14 and loss=0.37 Im training for 40 epochs so once thats over ill share the notebook |
ok thanks |
Please check this : https://colab.research.google.com/gist/benihime91/00996411c8174a81f6c1389750012103/github-retinanet-demo.ipynb 40 epochs, loss = 0.543 , classification_loss=0.233, regression_loss=0.153, val_loss=0.435 coco-evaluation results: IoU metric: bbox
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.322
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.751
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.154
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.333
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.321
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.491
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.272
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.405
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.451
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.433
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.398
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.567 |
I will run it now and let you know about the results |
If it still doesn't work try installing pytorch-lightning=1.0.0 (but i don't think that should be an issue 😌) and share me your notebook |
Yeah sure :) |
I ran your notebook exactly and I am getting poor results. IoU metric: bbox DATALOADER:0 TEST RESULTS
|
I just opened the link and ran the notebook and I am getting the above poor results |
Can u try with pytorch-lightning version 1.0.0.. Just to pip install pytorch-lightning=1.0.0 |
If it doesn't work please share me your notebook.. Or else I'm afraid i won't be able to do anything more |
Did you run your notebook on colab or someother platform? |
on colab itself |
can you list the versions of all the essential libraries that you used such as pytorch lightining, pytorch, torchvision, etc? |
The only library that may cause conflicts in pytorch-lightning beacause they had some massive changes... So that why i am saying try with pytorch-lightning version 1.0.0. Other libraries are all deafult installed in colab and Omegaconf and albumentations should not cause conflicts !pip install pytorch-lightning=1.0.0 |
ok I will do that now |
and also please share your notebook or i am out of options |
Its working now. You are right. Its due to the pytorch-lightning version. Thanks for your help, |
That's to be expected you need to do hyper-parameter tuning try using |
Ok I will look into that. Again thanks for your help |
I have updated the colab notebook and requirements.txt be sure to get the latest ones |
Hey man: |
When I run the colab demo code, it does not produce the correct predictions. In the image titled 'Predictions', there are no bounding boxes or labels that appear.
The text was updated successfully, but these errors were encountered: