Code Monkey home page Code Monkey logo

mkang315 / cst-yolo Goto Github PK

View Code? Open in Web Editor NEW
40.0 2.0 10.0 1.82 MB

[ICIP'24 Oral Presentation] Official implementation of "CST-YOLO: A Novel Method for Blood Cell Detection Based on Improved YOLOv7 and CNN-Swin Transformer".

License: GNU General Public License v3.0

Python 99.38% Shell 0.44% Dockerfile 0.18%
blood-cell-detection complete-bloodcell-count computer-vision convolutional-neural-networks deep-learning deep-neural-networks medical-image-analysis medical-image-computing medical-image-processing multiscale

cst-yolo's Introduction

Official CST-YOLO

This is the source code for the paper titled "CST-YOLO: A Novel Method for Blood Cell Detection Based on Improved YOLOv7 and CNN-Swin Transformer" accepted and presented orally at 2024 IEEE International Conference on Image Processing (ICIP 2024), of which I am the first author. This paper is available to download from arXiv.

Model

The CNN-Swin Transformer You Only Look Once (CST-YOLO) model configuration (i.e., network construction) file is cst-yolo.yaml in the directory ./cfg/training/.

Installation

Install requirements.txt with recommended dependencies Python >= 3.8 environment including Torch <= 1.7.1 and CUDA <= 11.1:

pip install -r requirements.txt

Training

The hyperparameter setting file is hyp.scratch.p5.yaml in the directory ./data/.

Single GPU training
python train.py --workers 8 --device 0 --batch-size 32 --data data/cbc.yaml --img 640 640 --cfg cfg/training/cst-yolo.yaml --weights '' --name cst-yolo --hyp data/hyp.scratch.p5.yaml
Multiple GPU training
python -m torch.distributed.launch --nproc_per_node 4 --master_port 9527 train.py --workers 8 --device 0,1,2,3 --sync-bn --batch-size 128 --data data/cbc.yaml --img 640 640 --cfg cfg/training/cst-yolo.yaml --weights '' --name rcs-yolo --hyp data/hyp.scratch.p5.yaml

Testing

python test.py --data data/cbc.yaml --img 640 --batch 32 --conf 0.001 --iou 0.65 --device 0 --weights runs/train/exp/weights/best.pt --name val

Evaluation

We trained and evaluated CST-YOLO on three blood cell detection datasets Blood Cell Count and Detection (BCCD), Complete Blood Count (CBC), and Blood Cell Detection (BCD). The 60 samples of the validation set duplicate those from the training set in the CBC dataset. Each image includes three types of blood cells: Red Blood Cells (RBCs), White Blood Cells (WBCs), and platelets.

Suggested Citation

Please cite our paper if you use code from this repository:

Plain Text

  • IEEE Style
    M. Kang, C.-M. Ting, F. F. Ting, and R. C.-W. Phan, "Cst-yolo: A novel method for blood cell detection based on improved yolov7 and cnn-swin transformer," in Proc. IEEE Int. Conf. Image Process. (ICIP), Abu Dhabi, UAE, Oct. 27–30, 2024, in press (pp. 000–000).
    NOTE: City of Conf., Abbrev. State, Country, Month & day(s) are optional.

  • Nature Style
    Kang, M., Ting, C.-M., Ting, F. F. & Phan, R. C.-W. CST-YOLO: a novel method for blood cell detection based on improved YOLOv7 and CNN-swin transformer. In 2024 IEEE International Conference on Image Processing (ICIP) in press (000–000) (IEEE, 2024).

  • Springer Style
    Kang, M., Ting, C.-M., Ting, F.F., Phan, R.C.-W.: CST-YOLO: a novel method for blood cell detection based on improved YOLOv7 and CNN-swin transformer. In 2024 IEEE International Conference on Image Processing (ICIP), in press (000–000). IEEE, Piscataway (2024)

  • Elsevier Numbered Style
    M. Kang, C.-M. Ting, F.F. Ting, R.C.-W. Phan, CST-YOLO: A novel method for blood cell detection based on improved YOLOv7 and CNN-swin transformer, in: Proceedings of the IEEE International Conference on Image Processing (ICIP), 27–30 October 2024, Abu Dhabi, UAE, IEEE, Piscataway, NY, USA, 2024, in press (pp. 000–000).
    NOTE: Day(s) Month Year, City, Abbrev. State, Country of Conference, Publiser, and Place of Publication are optional.

  • Harvard (Name–Date) Style
    Kang, M., Ting, C.-M., Ting, F.F., Phan, R.C.-W., 2024. CST-YOLO: A novel method for blood cell detection based on improved YOLOv7 and CNN-swin transformer, in: Proceedings of the IEEE International Conference on Image Processing (ICIP), 27–30 October 2024, Abu Dhabi, UAE. IEEE, Piscataway, NY, USA, in press (pp. 000–000).
    NOTE: Day(s) Month Year, City, Abbrev. State, Country of Conference, Publiser, and Place of Publication are optional.

BibTeX Format

\begin{thebibliography}{1}
\bibitem{Kang24Cstyolo} M. Kang, C.-M. Ting, F. F. Ting, and R. C.-W. Phan, "Cst-yolo: A novel method for blood cell detection based on improved yolov7 and cnn-swin transformer," in {\it Proc. IEEE Int. Conf. Image Process. (ICIP)}, Abu Dhabi, UAE, Oct. 27--30, 2024, in press.
\end{thebibliography}
@inproceedings{Kang24Cstyolo,
  author = "Ming Kang and Chee-Ming Ting and Fung Fung Ting and Rapha{\"e}l C.-W. Phan",
  title = "Rcs-yolo: A fast and high-accuracy object detector for brain tumor detection",
  booktitle = "Proc. IEEE Int. Conf. Image Process. (ICIP)",
  address = "Abu Dhabi, UAE, Oct. 27--30",
  pages = "000--000",
  year = "2024",
}
@inproceedings{Kang24Cstyolo,
  author = "Kang, Ming and Ting, Chee-Ming and Ting, Fung Fung and Phan, Rapha{\"e}l C.-W.",
  title = "CST-YOLO: a novel method for blood cell detection based on improved YOLOv7 and CNN-swin transformer",
  editor = "",
  booktitle = "2024 IEEE International Conference on Image Processing (ICIP)",
  series = "",
  volume = "",
  pages = "000--000",
  publisher = "IEEE",
  address = "Piscataway",
  year = "2024",
  doi= "10.1109/ICIP49359.2024.00000000",
  url = "https://doi.org/10.1109/ICIP49359.2024.00000000"
}

NOTE: Please remove some optional BibTeX fields, for example, series, volume, address, url and so on, while the LaTeX compiler produces an error. Author names may be manually modified if not automatically abbreviated by the compiler under the control of the .bst file if applicable which defines bibliography/reference style. Kang24Cstyolo could be b1, bib1, or ref1 when references appear in numbered style in which they are cited. The quotation mark pair "" in the field could be replaced by the brace {}.

License

CST-YOLO is released under the GNU General Public License v3.0. Please see the LICENSE file for more information.

Copyright Notice

Many utility codes of our project base on the codes of YOLOv7 and Swin Transformer repositories.

cst-yolo's People

Contributors

mkang315 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cst-yolo's Issues

When I execute train.py I get the following error: NameError: nane 'myModel' is not defined

Traceback(most recent call last):
File "/home/hndx/llz/CST-YOLO-main/train. py", line 623, in
train(hyp, opt, device, tb_writer)
File"/home/hndx/llz/CST-YOLO-main/train. py", line 97, in train
model=Model(opt. cfg, ch=3, nc=nc, anchors=hyp. get(' anchors')). to(device)# create
File"/home/hndx/llz/CST-YOLO-main/models/yolopy", Line 528, in__init__
self. model, self. save=parse._model(deepcopy(seLf. yamt), ch=[ ch])# model, savelist
File "/nome/hndx/llz/CST-YOLO-main/models/yolo . py", tine 761, in parse_model
Aatten, myModel, myWinTR]:
NameError: name ' myModel' is not defined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.