toandaominh1997 / EfficientDet.Pytorch

Implementation EfficientDet: Scalable and Efficient Object Detection in PyTorch
MIT License
1.44k stars 306 forks source link

BGR vs RGB in demo.py #96

Open avantgardnerio opened 4 years ago

avantgardnerio commented 4 years ago

Images fed to the network in demo.py are BGR instead of RGB. This is apparent in the image in your readme - the car's headlights are blue, as are the bricks in the building. Please add this cvtColor in demo.py:

    def process(self, file_name=None, img=None, show=False):
        if file_name is not None:
            img = cv2.imread(file_name)
            img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)