Guillem96 / efficientdet-tf

Custom implementation of EfficientDet https://arxiv.org/abs/1911.09070
GNU General Public License v3.0
96 stars 23 forks source link

API changes. Model Initialization Fails. #20

Closed jgerardsimcock closed 3 years ago

jgerardsimcock commented 4 years ago

Following the example in the repo here

It seems the API has changes as this no longer works.

efficientdet.EfficientDet(
D=D,
num_classes=len(class2idx),
training_mode=True,
weights='D0-VOC',
custom_head_classifier=True
)
jgerardsimcock commented 4 years ago

Pip installation gives the following API for this class initialization:

pip install git+https://github.com/Guillem96/efficientdet-tf

Now when I go to initialize the class. The signature is different from the example.

Init signature: efficientdet.EfficientDet(*args, **kwargs)
Docstring:     
Parameters
----------
num_classes: int
    Number of classes to classify
D: int, default 0
    EfficientDet architecture based on a compound scaling,
    to better understand this parameter refer to EfficientDet 
    paper 4.2 section
bidirectional: bool, default True
    Use biFPN as feature extractor or FPN. If the value is set to True, then
    a biFPN will be used
freeze_backbone: bool, default False
    Wether to freeze the efficientnet backbone or not
score_threshold: float, default 0.1
    Score threshold to give a prediction as valid
weights: str, default 'imagenet'
    If set to 'imagenet' then the backbone will be pretrained
    on imagenet. If set to None, the backbone and the bifpn will be random
    initialized. If set to other value, both the backbone and bifpn
    will be initialized with pretrained weights
File:           ~/miniconda3/envs/labelme/lib/python3.6/site-packages/efficientdet/models/efficientdet.py
Type:           type
Subclasses:
jgerardsimcock commented 4 years ago

It looks like the pip install from github is installing the develop branch