1st place solution for SIIM-FISABIO-RSNA COVID-19 Detection Challenge

Overview

SIIM-COVID19-Detection

Alt text

Source code of the 1st place solution for SIIM-FISABIO-RSNA COVID-19 Detection Challenge.

1.INSTALLATION

  • Ubuntu 18.04.5 LTS
  • CUDA 10.2
  • Python 3.7.9
  • python packages are detailed separately in requirements.txt
$ conda create -n envs python=3.7.9
$ conda activate envs
$ conda install -c conda-forge gdcm
$ pip install -r requirements.txt
$ pip install git+https://github.com/ildoonet/pytorch-gradual-warmup-lr.git

2.DATASET

2.1 SIIM COVID 19 DATASET

  • download competition dataset at link then extract to ./dataset/siim-covid19-detection
$ cd src/prepare
$ python dicom2image_siim.py
$ python kfold_split.py
$ prepare_siim_annotation.py                        # effdet and yolo format
$ cp -r ../../dataset/siim-covid19-detection/images ../../dataset/lung_crop/.
$ python prepare_siim_lung_crop_annotation.py

2.2 EXTERNAL DATASET

  • download pneumothorax dataset at link then extract to ./dataset/external_dataset/pneumothorax/dicoms
  • download pneumonia dataset at link then extract to ./dataset/external_dataset/rsna-pneumonia-detection-challenge/dicoms
  • download vinbigdata dataset at link then extract to ./dataset/external_dataset/vinbigdata/dicoms
  • download chest14 dataset at link then extract to ./dataset/external_dataset/chest14/images
  • download chexpert high-resolution dataset at link or then extract to ./dataset/external_dataset/chexpert/train
  • download padchest dataset at link or then extract to ./dataset/external_dataset/padchest/images
    most of the images in bimcv and ricord overlap with siim covid trainset and testset. To avoid data-leak when training, I didn't use them. You can use script
$ cd src/prepare
$ python dicom2image_pneumothorax.py
$ python dicom2image_pneumonia.py
$ python prepare_pneumonia_annotation.py      # effdet and yolo format
$ python dicom2image_vinbigdata.py
$ python prepare_vinbigdata.py
$ python refine_data.py                       # remove unused file in chexpert + chest14 + padchest dataset
$ python resize_padchest_pneumothorax.py

dataset structure should be ./dataset/dataset_structure.txt

3.SOLUTION SUMMARY

Alt text

4.TRAIN MODEL

4.1 Classification

4.1.1 Multi head classification + segmentation

  • Stage1
$ cd src/classification_aux
$ bash train_chexpert_chest14.sh              #Pretrain backbone on chexpert + chest14
$ bash train_rsnapneu.sh                      #Pretrain rsna_pneumonia
$ bash train_siim.sh                          #Train siim covid19
  • Stage2: Generate soft-label for classification head and mask for segmentation head.
    Output: soft-label in ./pseudo_csv/[source].csv and public test masks in ./prediction_mask/public_test/masks
$ bash generate_pseudo_label.sh [checkpoints_dir]
  • Stage3: Train model on trainset + public testset, load checkpoint from previous round
$ bash train_pseudo.sh [previous_checkpoints_dir] [new_checkpoints_dir]

Rounds of pseudo labeling (stage2) and retraining (stage3) were repeated until the score on public LB didn't improve.

  • For final submission
$ bash generate_pseudo_label.sh checkpoints_v3
$ bash train_pseudo.sh checkpoints_v3 checkpoints_v4
  • For evaluation
$ CUDA_VISIBLE_DEVICES=0 python evaluate.py --cfg configs/xxx.yaml --num_tta xxx

[email protected] 4 classes: negative, typical, indeterminate, atypical

SeR152-Unet EB5-Deeplab EB6-Linknet EB7-Unet++ Ensemble
w/o TTA/8TTA 0.575/0.584 0.583/0.592 0.580/0.587 0.589/0.595 0.595/0.598

8TTA: (orig, center-crop 80%)x(None, hflip, vflip, hflip & vflip). In final submission, I use 4.1.2 lung detector instead of center-crop 80%

4.1.2 Lung Detector-YoloV5

I annotated the train data(6334 images) using LabelImg and built a lung localizer. I noticed that increasing input image size improves the modeling performance and lung detector helps the model to reduce background noise.

$ cd src/detection_lung_yolov5
$ cd weights && bash download_coco_weights.sh && cd ..
$ bash train.sh
Fold0 Fold1 Fold2 Fold3 Fold4 Average
[email protected]:0.95 0.921 0.931 0.926 0.923 0.922 0.9246
[email protected] 0.997 0.998 0.997 0.996 0.998 0.9972

4.2 Opacity Detection

Rounds of pseudo labeling (stage2) and retraining (stage3) were repeated until the score on public LB didn't improve.

4.2.1 YoloV5x6 768

  • Stage1:
$ cd src/detection_yolov5
$ cd weights && bash download_coco_weights.sh && cd ..
$ bash train_rsnapneu.sh          #pretrain with rsna_pneumonia
$ bash train_siim.sh              #train with siim covid19 dataset, load rsna_pneumonia checkpoint
  • Stage2: Generate pseudo label (boxes)
$ bash generate_pseudo_label.sh

Jump to step 4.2.4 Ensembling + Pseudo labeling

  • Stage3:
$ bash warmup_ext_dataset.sh      #train with pseudo labeling (public-test, padchest, pneumothorax, vin) + rsna_pneumonia
$ bash train_final.sh             #train siim covid19 boxes, load warmup checkpoint

4.2.2 EfficientDet D7 768

  • Stage1:
$ cd src/detection_efffdet
$ bash train_rsnapneu.sh          #pretrain with rsna_pneumonia
$ bash train_siim.sh              #train with siim covid19 dataset, load rsna_pneumonia checkpoint
  • Stage2: Generate pseudo label (boxes)
$ bash generate_pseudo_label.sh

Jump to step 4.2.4 Ensembling + Pseudo labeling

  • Stage3:
$ bash warmup_ext_dataset.sh      #train with pseudo labeling (public-test, padchest, pneumothorax, vin) + rsna_pneumonia
$ bash train_final.sh             #train siim covid19, load warmup checkpoint

4.2.3 FasterRCNN FPN 768 & 1024

  • Stage1: train backbone of model with chexpert + chest14 -> train model with rsna pneummonia -> train model with siim, load rsna pneumonia checkpoint
$ cd src/detection_fasterrcnn
$ CUDA_VISIBLE_DEVICES=0,1,2,3 python train_chexpert_chest14.py --steps 0 1 --cfg configs/resnet200d.yaml
$ CUDA_VISIBLE_DEVICES=0,1,2,3 python train_chexpert_chest14.py --steps 0 1 --cfg configs/resnet101d.yaml
$ CUDA_VISIBLE_DEVICES=0 python train_rsnapneu.py --cfg configs/resnet200d.yaml
$ CUDA_VISIBLE_DEVICES=0 python train_rsnapneu.py --cfg configs/resnet101d.yaml
$ CUDA_VISIBLE_DEVICES=0 python train_siim.py --cfg configs/resnet200d.yaml --folds 0 1 2 3 4 --SEED 123
$ CUDA_VISIBLE_DEVICES=0 python train_siim.py --cfg configs/resnet101d.yaml --folds 0 1 2 3 4 --SEED 123

Note: Change SEED if training script runs into issue related to augmentation (boundingbox area=0) and comment/uncomment the following code if training script runs into issue related to resource limit

import resource
rlimit = resource.getrlimit(resource.RLIMIT_NOFILE)
resource.setrlimit(resource.RLIMIT_NOFILE, (8192, rlimit[1]))
  • Stage2: Generate pseudo label (boxes)
$ bash generate_pseudo_label.sh

Jump to step 4.2.4 Ensembling + Pseudo labeling

  • Stage3:
$ CUDA_VISIBLE_DEVICES=0 python warmup_ext_dataset.py --cfg configs/resnet200d.yaml
$ CUDA_VISIBLE_DEVICES=0 python warmup_ext_dataset.py --cfg configs/resnet101d.yaml
$ CUDA_VISIBLE_DEVICES=0 python train_final.py --cfg configs/resnet200d.yaml
$ CUDA_VISIBLE_DEVICES=0 python train_final.py --cfg configs/resnet101d.yaml

4.2.4 Ensembling + Pseudo labeling

Keep images that meet the conditions: negative prediction < 0.3 and maximum of (typical, indeterminate, atypical) predicion > 0.7. Then choose 2 boxes with the highest confidence as pseudo labels for each image.

Note: This step requires at least 128 GB of RAM

$ cd ./src/detection_make_pseudo
$ python make_pseudo.py
$ python make_annotation.py            

4.2.5 Detection Performance

YoloV5x6 768 EffdetD7 768 F-RCNN R200 768 F-RCNN R101 1024
[email protected] TTA 0.580 0.594 0.592 0.596

Final result: Public LB/Private LB: 0.658/0.635

5.FINAL KERNEL

siim-covid19-2021
demo notebook to visualize output of models

6.AWESOME RESOURCES

Pytorch
PyTorch Image Models
Segmentation models
EfficientDet
YoloV5
FasterRCNN FPN
Albumentations
Weighted boxes fusion

Comments
  • Not reproducable effdet results because native amp

    Not reproducable effdet results because native amp

    Hello, thank you for code. But I found strange line: https://github.com/dungnb1333/SIIM-COVID19-Detection/blob/main/src/detection_efffdet/predict_test.py#L161 If I use inference with torch native amp autocast(I didn't check with apex), result will be different every time.

    opened by trytolose 1
  • Why is there only one category

    Why is there only one category

    Thank you very much for sharing your project,But I have one thing I don't understand:why is there only one category, and there are four categories of official data sets. I don't understand it,could you please answer this question,thanks.......

    opened by JasenWangLab 1
  • No

    No "timm-seresnet152d_320"

    I was looking at the classification_aux folder and I was trying to call the get_encoder() function from the SMP library with the encoder_name = "timm-seresnet152d_320". However, I got an error saying that this wasn't part of the supported model encoders. The closest one was a "seresnet152". Below is the code and error I got. Could this be a version problem? Thanks! se_resnet152d = get_encoder('timm-seresnet152d_320', in_channels=3, depth=5, weights='imagenet') image

    opened by alckasoc 1
  • Bump pip from 18.1 to 19.2 in /src/detection_lung_yolov5/utils/google_app_engine

    Bump pip from 18.1 to 19.2 in /src/detection_lung_yolov5/utils/google_app_engine

    Bumps pip from 18.1 to 19.2.

    Changelog

    Sourced from pip's changelog.

    19.2 (2019-07-22)

    Deprecations and Removals

    • Drop support for EOL Python 3.4. ([#6685](https://github.com/pypa/pip/issues/6685) <https://github.com/pypa/pip/issues/6685>_)
    • Improve deprecation messages to include the version in which the functionality will be removed. ([#6549](https://github.com/pypa/pip/issues/6549) <https://github.com/pypa/pip/issues/6549>_)

    Features

    • Credentials will now be loaded using keyring when installed. ([#5948](https://github.com/pypa/pip/issues/5948) <https://github.com/pypa/pip/issues/5948>_)
    • Fully support using --trusted-host inside requirements files. ([#3799](https://github.com/pypa/pip/issues/3799) <https://github.com/pypa/pip/issues/3799>_)
    • Update timestamps in pip's --log file to include milliseconds. ([#6587](https://github.com/pypa/pip/issues/6587) <https://github.com/pypa/pip/issues/6587>_)
    • Respect whether a file has been marked as "yanked" from a simple repository (see PEP 592 <https://www.python.org/dev/peps/pep-0592/>__ for details). ([#6633](https://github.com/pypa/pip/issues/6633) <https://github.com/pypa/pip/issues/6633>_)
    • When choosing candidates to install, prefer candidates with a hash matching one of the user-provided hashes. ([#5874](https://github.com/pypa/pip/issues/5874) <https://github.com/pypa/pip/issues/5874>_)
    • Improve the error message when METADATA or PKG-INFO is None when accessing metadata. ([#5082](https://github.com/pypa/pip/issues/5082) <https://github.com/pypa/pip/issues/5082>_)
    • Add a new command pip debug that can display e.g. the list of compatible tags for the current Python. ([#6638](https://github.com/pypa/pip/issues/6638) <https://github.com/pypa/pip/issues/6638>_)
    • Display hint on installing with --pre when search results include pre-release versions. ([#5169](https://github.com/pypa/pip/issues/5169) <https://github.com/pypa/pip/issues/5169>_)
    • Report to Warehouse that pip is running under CI if the PIP_IS_CI environment variable is set. ([#5499](https://github.com/pypa/pip/issues/5499) <https://github.com/pypa/pip/issues/5499>_)
    • Allow --python-version to be passed as a dotted version string (e.g. 3.7 or 3.7.3). ([#6585](https://github.com/pypa/pip/issues/6585) <https://github.com/pypa/pip/issues/6585>_)
    • Log the final filename and SHA256 of a .whl file when done building a wheel. ([#5908](https://github.com/pypa/pip/issues/5908) <https://github.com/pypa/pip/issues/5908>_)
    • Include the wheel's tags in the log message explanation when a candidate wheel link is found incompatible. ([#6121](https://github.com/pypa/pip/issues/6121) <https://github.com/pypa/pip/issues/6121>_)
    • Add a --path argument to pip freeze to support --target installations. ([#6404](https://github.com/pypa/pip/issues/6404) <https://github.com/pypa/pip/issues/6404>_)
    • Add a --path argument to pip list to support --target installations. ([#6551](https://github.com/pypa/pip/issues/6551) <https://github.com/pypa/pip/issues/6551>_)

    Bug Fixes

    • Set sys.argv[0] to the underlying setup.py when invoking setup.py via the setuptools shim so setuptools doesn't think the path is -c. ([#1890](https://github.com/pypa/pip/issues/1890) <https://github.com/pypa/pip/issues/1890>_)
    • Update pip download to respect the given --python-version when checking "Requires-Python". ([#5369](https://github.com/pypa/pip/issues/5369) <https://github.com/pypa/pip/issues/5369>_)
    • Respect --global-option and --install-option when installing from a version control url (e.g. git). ([#5518](https://github.com/pypa/pip/issues/5518) <https://github.com/pypa/pip/issues/5518>_)
    • Make the "ascii" progress bar really be "ascii" and not Unicode. ([#5671](https://github.com/pypa/pip/issues/5671) <https://github.com/pypa/pip/issues/5671>_)
    • Fail elegantly when trying to set an incorrectly formatted key in config. ([#5963](https://github.com/pypa/pip/issues/5963) <https://github.com/pypa/pip/issues/5963>_)
    • Prevent DistutilsOptionError when prefix is indicated in the global environment and --target is used. ([#6008](https://github.com/pypa/pip/issues/6008) <https://github.com/pypa/pip/issues/6008>_)
    • Fix pip install to respect --ignore-requires-python when evaluating links. ([#6371](https://github.com/pypa/pip/issues/6371) <https://github.com/pypa/pip/issues/6371>_)

    ... (truncated)

    Commits
    • 0e64295 Generate NEWS
    • 0df416d Bump version for release
    • 5f0aa2a Generate AUTHORS.txt
    • 8582f7e Reduce dependency on ctypes when discovering glibc version. (#6678)
    • e308497 Merge pull request #6743 from chrahunt/maint/remove-path-copytree
    • 9281a7a Remove copytree from tests.lib.path.Path.
    • 0d28601 Remove copy from tests.lib.path.Path. (#6746)
    • c275e9d Drop a useless import in favor of explicitness
    • 3732e79 Remove normpath from tests.lib.path.Path.
    • 358e690 Remove move from tests.lib.path.Path.
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Suggest to loosen the dependency on albumentations

    Suggest to loosen the dependency on albumentations

    Dear developers,

    Your project SIIM-COVID19-Detection requires "albumentations==1.0.0" in its dependency. After analyzing the source code, we found that the following versions of albumentations can also be suitable without affecting your project, i.e., albumentations 1.0.1, 1.0.2, 1.0.3. Therefore, we suggest to loosen the dependency on albumentations from "albumentations==1.0.0" to "albumentations>=1.0.0,<=1.0.3" to avoid any possible conflict for importing more packages or for downstream projects that may use ddos_script.

    May I pull a request to further loosen the dependency on albumentations?

    By the way, could you please tell us whether such dependency analysis may be potentially helpful for maintaining dependencies easier during your development?



    Details:

    Your project (commit id: 982a6b12955e8f53ec3f8af46754251b1678e08c) directly uses 24 APIs from package albumentations.

    albumentations.augmentations.transforms.MotionBlur.__init__, albumentations.augmentations.geometric.resize.Resize.__init__, albumentations.pytorch.transforms.ToTensorV2.__init__, albumentations.augmentations.transforms.CLAHE.__init__, albumentations.imgaug.transforms.IAASharpen.__init__, albumentations.augmentations.transforms.RandomContrast.__init__, albumentations.augmentations.geometric.rotate.Rotate.__init__, albumentations.core.composition.OneOf.__init__, albumentations.augmentations.transforms.Normalize.__init__, albumentations.augmentations.transforms.Cutout.__init__, albumentations.augmentations.transforms.RandomBrightnessContrast.__init__, albumentations.core.composition.Compose.__init__, albumentations.augmentations.crops.transforms.RandomResizedCrop.__init__, albumentations.augmentations.transforms.RandomBrightness.__init__, albumentations.augmentations.transforms.MedianBlur.__init__, albumentations.imgaug.transforms.IAAAdditiveGaussianNoise.__init__, albumentations.augmentations.geometric.resize.LongestMaxSize.__init__, albumentations.augmentations.transforms.RandomGamma.__init__, albumentations.augmentations.geometric.transforms.ShiftScaleRotate.__init__, albumentations.augmentations.transforms.Blur.__init__, albumentations.augmentations.transforms.VerticalFlip.__init__, albumentations.imgaug.transforms.IAAEmboss.__init__, albumentations.core.composition.BboxParams.__init__, albumentations.augmentations.transforms.HorizontalFlip.__init__
    

    Beginning fromwhich, 13 functions are then indirectly called, including 12 albumentations's internal APIs and 1 outsider APIs as follows:

    [/dungnb1333/SIIM-COVID19-Detection]
    +--albumentations.augmentations.transforms.MotionBlur.__init__
    |      +--albumentations.augmentations.transforms.Blur.__init__
    |      |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    |      |      +--albumentations.core.transforms_interface.to_tuple
    +--albumentations.augmentations.geometric.resize.Resize.__init__
    |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    +--albumentations.pytorch.transforms.ToTensorV2.__init__
    |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    +--albumentations.augmentations.transforms.CLAHE.__init__
    |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    |      +--albumentations.core.transforms_interface.to_tuple
    +--albumentations.imgaug.transforms.IAASharpen.__init__
    |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    |      +--albumentations.core.transforms_interface.to_tuple
    |      +--warnings.warn
    +--albumentations.augmentations.transforms.RandomContrast.__init__
    |      +--albumentations.augmentations.transforms.RandomBrightnessContrast.__init__
    |      |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    |      |      +--albumentations.core.transforms_interface.to_tuple
    |      +--warnings.warn
    +--albumentations.augmentations.geometric.rotate.Rotate.__init__
    |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    |      +--albumentations.core.transforms_interface.to_tuple
    +--albumentations.core.composition.OneOf.__init__
    |      +--albumentations.core.composition.BaseCompose.__init__
    |      |      +--albumentations.core.composition.Transforms.__init__
    |      |      |      +--albumentations.core.composition.Transforms._find_dual_start_end
    |      |      |      |      +--albumentations.core.composition.Transforms._find_dual_start_end
    +--albumentations.augmentations.transforms.Normalize.__init__
    |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    +--albumentations.augmentations.transforms.Cutout.__init__
    |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    |      +--warnings.warn
    +--albumentations.augmentations.transforms.RandomBrightnessContrast.__init__
    +--albumentations.core.composition.Compose.__init__
    |      +--albumentations.core.composition.BaseCompose.__init__
    |      +--albumentations.augmentations.bbox_utils.BboxProcessor.__init__
    |      |      +--albumentations.core.utils.DataProcessor.__init__
    |      +--albumentations.core.composition.BboxParams.__init__
    |      |      +--albumentations.core.utils.Params.__init__
    |      +--albumentations.augmentations.keypoints_utils.KeypointsProcessor.__init__
    |      |      +--albumentations.core.utils.DataProcessor.__init__
    |      +--albumentations.core.composition.KeypointParams.__init__
    |      |      +--albumentations.core.utils.Params.__init__
    |      +--albumentations.core.composition.BaseCompose.add_targets
    +--albumentations.augmentations.crops.transforms.RandomResizedCrop.__init__
    |      +--albumentations.augmentations.crops.transforms._BaseRandomSizedCrop.__init__
    |      |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    +--albumentations.augmentations.transforms.RandomBrightness.__init__
    |      +--albumentations.augmentations.transforms.RandomBrightnessContrast.__init__
    |      +--warnings.warn
    +--albumentations.augmentations.transforms.MedianBlur.__init__
    |      +--albumentations.augmentations.transforms.Blur.__init__
    +--albumentations.imgaug.transforms.IAAAdditiveGaussianNoise.__init__
    |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    |      +--albumentations.core.transforms_interface.to_tuple
    |      +--warnings.warn
    +--albumentations.augmentations.geometric.resize.LongestMaxSize.__init__
    |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    +--albumentations.augmentations.transforms.RandomGamma.__init__
    |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    |      +--albumentations.core.transforms_interface.to_tuple
    +--albumentations.augmentations.geometric.transforms.ShiftScaleRotate.__init__
    |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    |      +--albumentations.core.transforms_interface.to_tuple
    +--albumentations.augmentations.transforms.Blur.__init__
    +--albumentations.augmentations.transforms.VerticalFlip.__init__
    |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    +--albumentations.imgaug.transforms.IAAEmboss.__init__
    |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    |      +--albumentations.core.transforms_interface.to_tuple
    |      +--warnings.warn
    +--albumentations.core.composition.BboxParams.__init__
    +--albumentations.augmentations.transforms.HorizontalFlip.__init__
    |      +--albumentations.core.transforms_interface.BasicTransform.__init__
    

    Since all these functions have not been changed between any version for package "albumentations" from [1.0.1, 1.0.2, 1.0.3] and 1.0.0. Therefore, we believe it is safe to loosen the corresponding dependency.

    opened by Agnes-U 0
  • Regarding class weights in bce loss function

    Regarding class weights in bce loss function

    weight=torch.FloatTensor([0.2, 0.2, 0.3, 0.3]

    Above parameter is corresponding to inputs in a batch.

    To handle class imbalance, I think the parameter is pos_weight and not weight.

    https://pytorch.org/docs/stable/generated/torch.nn.BCEWithLogitsLoss.html?highlight=bcewithlogitsloss#torch.nn.BCEWithLogitsLoss

    opened by puneeshkhanna 0
  • Reproducing results from demo.ipynb

    Reproducing results from demo.ipynb

    Is it possible for you to provide all the weights and checkpoints used for creating the demo.ipynb notebook for visualizing the model outputs? I was hoping to try the model on some data without having to train the model again.

    opened by chinmaySinghal 0
Owner
Nguyen Ba Dung
https://www.linkedin.com/in/dungnb1333/
Nguyen Ba Dung
7th place solution

SIIM-FISABIO-RSNA-COVID-19-Detection 7th place solution Validation: We used iterative-stratification with 5 folds (https://github.com/trent-b/iterativ

null 11 Jul 17, 2022
EAST for ICPR MTWI 2018 Challenge II (Text detection of network images)

EAST_ICPR2018: EAST for ICPR MTWI 2018 Challenge II (Text detection of network images) Introduction This is a repository forked from argman/EAST for t

QichaoWu 49 Dec 24, 2022
Solution for Problem 1 by team codesquad for AIDL 2020. Uses ML Kit for OCR and OpenCV for image processing

CodeSquad PS1 Solution for Problem Statement 1 for AIDL 2020 conducted by @unifynd technologies. Problem Given images of bills/invoices, the task was

Burhanuddin Udaipurwala 111 Nov 27, 2022
"Very simple but works well" Computer Vision based ID verification solution provided by LibraX.

ID Verification by LibraX.ai This is the first free Identity verification in the market. LibraX.ai is an identity verification platform for developers

LibraX.ai 46 Dec 6, 2022
A list of hyperspectral image super-solution resources collected by Junjun Jiang

A list of hyperspectral image super-resolution resources collected by Junjun Jiang. If you find that important resources are not included, please feel free to contact me.

Junjun Jiang 301 Jan 5, 2023
An easy to use an (hopefully useful) captcha solution for pyTelegramBotAPI

pyTelegramBotCAPTCHA An easy to use and (hopefully useful) image CAPTCHA soltion for pyTelegramBotAPI. Installation: pip install pyTelegramBotCAPTCHA

null 29 Dec 26, 2022
Give a solution to recognize MaoYan font.

猫眼字体识别 该 github repo 在于帮助xjtlu的同学们识别猫眼的扭曲字体。已经打包上传至 pypi ,可以使用 pip 直接安装。 猫眼字体的识别不出来的原理与解决思路在采茶上 使用方法: import MaoYanFontRecognize

Aruix 4 Jun 30, 2022
Forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE

EAST_ICPR: EAST for ICPR MTWI 2018 CHALLENGE Introduction This is a repository forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE. Origin Reposi

Haozheng Li 157 Aug 23, 2022
This project modify tensorflow object detection api code to predict oriented bounding boxes. It can be used for scene text detection.

This is an oriented object detector based on tensorflow object detection API. Most of the code is not changed except for those related to the need of

Dafang He 30 Oct 22, 2022
A novel region proposal network for more general object detection ( including scene text detection ).

DeRPN: Taking a further step toward more general object detection DeRPN is a novel region proposal network which concentrates on improving the adaptiv

Deep Learning and Vision Computing Lab, SCUT 151 Dec 12, 2022
YOLOv5 in DOTA with CSL_label.(Oriented Object Detection)(Rotation Detection)(Rotated BBox)

YOLOv5_DOTA_OBB YOLOv5 in DOTA_OBB dataset with CSL_label.(Oriented Object Detection) Datasets and pretrained checkpoint Datasets : DOTA Pretrained Ch

null 1.1k Dec 30, 2022
deployment of a hybrid model for automatic weapon detection/ anomaly detection for surveillance applications

Automatic Weapon Detection Deployment of a hybrid model for automatic weapon detection/ anomaly detection for surveillance applications. Loved the pro

Janhavi 4 Mar 4, 2022
Shape Detection - It's a shape detection project with OpenCV and Python.

Shape Detection It's a shape detection project with OpenCV and Python. Setup pip install opencv-python for doing AI things. pip install simpleaudio fo

null 1 Nov 26, 2022
Morphological edge detection or object's boundary detection using erosion and dialation in OpenCV python

Morphologycal-edge-detection-using-erosion-and-dialation the task is to detect object boundary using erosion or dialation . Here, use the kernel or st

Tamzid hasan 3 Nov 25, 2022
🔎 Like Chardet. 🚀 Package for encoding & language detection. Charset detection.

Charset Detection, for Everyone ?? The Real First Universal Charset Detector A library that helps you read text from an unknown charset encoding. Moti

TAHRI Ahmed R. 332 Dec 31, 2022
Hand Detection and Finger Detection on Live Feed

Hand-Detection-On-Live-Feed Hand Detection and Finger Detection on Live Feed Getting Started Install the dependencies $ git clone https://github.com/c

Chauhan Mahaveer 2 Jan 2, 2022
Unofficial implementation of "TableNet: Deep Learning model for end-to-end Table detection and Tabular data extraction from Scanned Document Images"

TableNet Unofficial implementation of ICDAR 2019 paper : TableNet: Deep Learning model for end-to-end Table detection and Tabular data extraction from

Jainam Shah 243 Dec 30, 2022
TableBank: A Benchmark Dataset for Table Detection and Recognition

TableBank TableBank is a new image-based table detection and recognition dataset built with novel weak supervision from Word and Latex documents on th

null 844 Jan 4, 2023