git clone https://github.com/OneChorm/YoDe-Segmentation
conda create -n YoDe_Seg python==3.10.11
conda activate YoDe_Seg
pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113
cd "your dir to `YoDe-Segmentation`" # change directory
pip install -r requirements.txt
pip install YoDe-Segmentation-v2==1.0.1
Put the weight of Deeplabv3 model and the weight of YOLOV5 model in the weights folder
If you need to work with pdf files, you should put the files in the test_pdf folder,and then convert pdf files to images. If you run into an error with the pdf conversion, you could run the pdf2img.py in a python compiler.
run the pdf2img.py
python pdf2img.py
if need to work with images, you should only put the images in the test_img folder
run the predict_molecular.py
python predict_molecular.py
More examples are given in this Jupyter Notebook.
You can download the Datasets at YoDe-Segmentation_data