nndl_midterm_task2
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.3%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: Xiaokai-Lin
- License: apache-2.0
- Language: Python
- Default Branch: main
- Size: 109 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Faster-RCNN and YOLOv3 for Object Detection
Used Framework
The project is built on top of the mmdetection.
How to train?
- Prepare the environment: Users have to install the mmdetection framework and its dependencies. The installation guide can be found here. The project is built-from-source following the installation guide. After installation,
cdinto themmdetectiondirectory.bash cd mmdetection Prepare the dataset: Download the Pascal VOC dataset using the following command:
bash python tools/misc/download_dataset.py --dataset-name voc2007However, we need to transform the dataset into the COCO format. To do this, run the following command:bash python voc_to_coco.pyThis script will create 3 annotation files in the VOCdevkit directory:voc07_train.json,voc07_val.json, andvoc07_test.json. Then, we need to utilize the scriptsplit.pywhere you need to modify line4 and line6 in order to seperate images into training and validation and test sets. After that, you can create a new folder named coco insidedatadirectory and move thevoc07_train.json,voc07_val.json, andvoc07_test.jsonfiles into thecocodirectory. Remember to rename the files toinstances_train2017.json,instances_val2017.json, andinstances_test2017.jsonrespectively. After that, thedata/cocodirectory should look like this:data/coco annotations instances_train2017.json instances_val2017.json instances_test2017.json test2017 train2017 val2017Train the model: To train the model, run the following command:
bash python tools/train.py configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py --work-dir ckpt/faster_rcnn
or
bash
python tools/train.py configs/yolov3/yolov3_d53_8xb8-ms-608-273e_coco.py --work-dir ckpt/yolov3
The training process will start and the model will be saved in the work_dirs directory. One can visualize the loss using tensorboard.
4. Test the model: To test the model, run the following command:
bash
python tools/test.py configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py ckpt/faster_rcnn/latest.pth --show-dir results/faster_rcnn
or
bash
python tools/test.py configs/yolov3/yolov3_d53_8xb8-ms-608-273e_coco.py ckpt/yolov3/latest.pth --show-dir results/yolov3
The testing process will start and the results will be saved in the results directory.
- Inference: To perform inference on an image, run the following command:
bash python demo/image_demo.py path/to/your/image configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py ckpt/faster_rcnn/latest.pth --out-dir inference_results
How to visualize the region proposals in the first stage of Faster-RCNN?
Run the command:
bash
python ./tools/test.py configs/rpn/rpn_r50_fpn_1x_coco.py path/to/your/ckpt --show-dir faster_rcnn_output2/rpn_proposal
Pretrained model
Checkpoints are available at : https://pan.baidu.com/s/1CSwTuAoM4eOzkBDr2FY2NA : tbjb --v6.
Owner
- Name: Xiaokai Lin
- Login: Xiaokai-Lin
- Kind: user
- Location: China, Shanghai
- Company: Fudan University
- Website: https://www.fudan.edu.cn/
- Repositories: 1
- Profile: https://github.com/Xiaokai-Lin
Student majored in applied statistics and trying to live