In my colab I’m trying to stick as close to raw DETR codebase so it’s pretty low level, vs the above is quite elegant in it’s own purpose of providing a friendlier set of abstractions, so two different aspects on working with DETR.
I am trying to run your notebook “06_Object_Detection_changed”, but it seems there is an issue with the bounding boxes when doing image resizing.
When I remove the resizing (item_tfms = [] (and add unique=True to show_results so that it doesn’t crash, everything works well.
However, as soon as I add the resizing (item_tfms = [Resize(224)]), the data loader seems to fail:
Btw, I think the same problem happens in @muellerzr’s original notebook when you resize to something else than 128 (which is actually the original image size of the TINY_COCO dataset).
Any idea of the reason of this problem, and how to fix it?
Not sure if you’re still checking this post, but I’ve been tinkering with fastai2 and object detection and tried using your notebook. Unfortunately I cannot seem to get past 2 errors.
for lookup_idx in range(NUM_CLASSES):
metrics.append(LookUpMetric(map_metric, dls.vocab[lookup_idx+1], lookup_idx))
I’m getting the error:
AttributeError: ‘str’ object has no attribute ‘stored_args’
And if I skip past it and try to run learn.fit_one_cycle(), I get this error:
TypeError: is_floating_point(): argument ‘input’ (position 1) must be Tensor, not int
I’m not sure if the two are connected. Does anyone have any ideas of what I can do next/where I can look at modifying some code?
I haven’t worked on this at all. Personally, I would use the IceVision library instead, as it’s a much more fleshed out object detection library for fastai.
I tested this implementation and managed to get it running. However it seems that there is something wrong with the RetinaNet or other part of the code, as I also couldn’t train it to acceptable results (mAP didn’t exceed 20%).
I haven’t worked on this at all. Personally, I would use the IceVision library instead, as it’s a much more fleshed out object detection library for fastai.
This is a great library! Object detection works out of the box. Here is a comparison of my struggles with training raw RetinaNet vs. efficientdet from icevision.
Can anyone please help me? while using learn.fit_sgdr , it gives an error of
AttributeError: ‘Learner’ object has no attribute ‘fit_sgdr’
I have used this package for installation
!pip install -U object-detection-fastai
from object_detection_fastai.helper.wsi_loader import *
from object_detection_fastai.loss.RetinaNetFocalLoss import RetinaNetFocalLoss
from object_detection_fastai.models.RetinaNet import RetinaNet
from object_detection_fastai.callbacks.callbacks import BBMetrics, PascalVOCMetricByDistance, PascalVOCMetric, PascalVOCMetricByDistance
if I try using fastai --upgrade it asks for restarting the runtime which is obvious, but I’m not able to use both in same notebook.
i need the object detection package for the earlier part of code for loading the MIDOG 2021 data , I cant use any other option for that .
but I need to use sgdr training too which I am not able to perform in jupyter notebook.
All suggestions are welcome .