- π Quick Links
- π Overview
- π Repository Structure
- π Getting Started
- π€ Contributing
- π License
- π Acknowledgments
GritAndGPT4 is a project designed to harness the capabilities of the GRIT (Generative Region-to-Text Transformer for Object Understanding) model to capture object descriptions. These descriptions are then processed by GPT-4, which generates safety suggestions to enhance driver awareness.
βββ GritAndGPT4/
βββ LICENSE 2
βββ configs/
β βββ Base.yaml
β βββ GRiT_B_DenseCap.yaml
β βββ GRiT_B_DenseCap_ObjectDet.yaml
β βββ GRiT_B_ObjectDet.yaml
β βββ GRiT_H_ObjectDet.yaml
β βββ GRiT_L_ObjectDet.yaml
βββ datasets/
βββ demo.py
βββ demo_images/
βββ detectron2/
β βββ .circleci/
β β βββ config.yml
β β βββ import-tests.sh
β βββ .clang-format
β βββ configs/
β β βββ Base-RCNN-C4.yaml
β β βββ Base-RCNN-DilatedC5.yaml
β β βββ Base-RCNN-FPN.yaml
β β βββ Base-RetinaNet.yaml
β β βββ COCO-Detection/
β β βββ COCO-InstanceSegmentation/
β β βββ COCO-Keypoints/
β β βββ COCO-PanopticSegmentation/
β β βββ Cityscapes/
β β βββ Detectron1-Comparisons/
β β βββ LVISv0.5-InstanceSegmentation/
β β βββ LVISv1-InstanceSegmentation/
β β βββ Misc/
β β βββ PascalVOC-Detection/
β β βββ common/
β β βββ new_baselines/
β β βββ quick_schedules/
β βββ datasets/
β β βββ prepare_ade20k_sem_seg.py
β β βββ prepare_cocofied_lvis.py
β β βββ prepare_for_tests.sh
β β βββ prepare_panoptic_fpn.py
β βββ demo/
β β βββ demo.py
β β βββ predictor.py
β βββ detectron2/
β β βββ checkpoint/
β β βββ config/
β β βββ engine/
β β βββ evaluation/
β β βββ export/
β β βββ layers/
β β βββ model_zoo/
β β βββ modeling/
β β βββ projects/
β β βββ solver/
β β βββ structures/
β β βββ tracking/
β β βββ utils/
β βββ dev/
β β βββ linter.sh
β β βββ packaging/
β β βββ parse_results.sh
β β βββ run_inference_tests.sh
β β βββ run_instant_tests.sh
β βββ docker/
β β βββ Dockerfile
β β βββ deploy.Dockerfile
β β βββ docker-compose.yml
β βββ projects/
β β βββ DeepLab/
β β βββ DensePose/
β β βββ Panoptic-DeepLab/
β β βββ PointRend/
β β βββ PointSup/
β β βββ Rethinking-BatchNorm/
β β βββ TensorMask/
β β βββ TridentNet/
β βββ setup.py
βββ grit/
β βββ config.py
β βββ custom_solver.py
β βββ evaluation/
β β βββ eval.py
β βββ modeling/
β β βββ backbone/
β β βββ meta_arch/
β β βββ roi_heads/
β β βββ soft_nms.py
β β βββ text/
β βββ predictor.py
βββ ks_demo_predictions/
β βββ 0046.txt
β βββ 0046_gpt-4_out.txt
β βββ 0117.txt
β βββ 0117_gpt-4_out.txt
β βββ 0158.txt
β βββ 0158_gpt-4_out.txt
β βββ 0226.txt
β βββ 0226_gpt-4_out.txt
β βββ 0309.txt
β βββ 0309_gpt-4_out.txt
β βββ 0334.txt
β βββ 0334_gpt-4_out.txt
β βββ 0422.txt
β βββ 0422_gpt-4_out.txt
β βββ 0518.txt
β βββ 0518_gpt-4_out.txt
β βββ 0623.txt
β βββ 0623_gpt-4_out.txt
β βββ 0638.txt
β βββ 0638_gpt-4_out.txt
β βββ 0803.txt
β βββ 0803_gpt-4_out.txt
β βββ 0831.txt
β βββ 0831_gpt-4_out.txt
βββ ks_demo_safety/
βββ ks_demo_visualizations/
βββ lauch_deepspeed.py
βββ node_modules/
β βββ yaml/
β βββ browser/
β βββ package.json
β βββ util.js
βββ predictions/
β βββ 1.txt
β βββ 1_gpt-4_out.txt
β βββ 2.txt
β βββ 2_gpt-4_out.txt
β βββ 85building.txt
β βββ 85building_gpt-4_out.txt
β βββ KS000455.txt
β βββ KS000455_gpt-4_out.txt
β βββ KS002508.txt
β βββ KS002508_gpt-4_out.txt
β βββ KS003229.txt
β βββ KS003229_gpt-4_out.txt
β βββ Kaohsiung_highschool_N.txt
β βββ Kaohsiung_highschool_N_gpt-4_out.txt
β βββ Kaohsiung_port.txt
β βββ Kaohsiung_port_gpt-4_out.txt
β βββ beef.txt
β βββ beef_gpt-4_out.txt
β βββ black_hole.txt
β βββ black_hole_gpt-4_out.txt
β βββ crowded traffic.txt
β βββ crowded traffic_gpt-4_out.txt
β βββ dock.txt
β βββ dock_gpt-4_out.txt
β βββ dog.txt
β βββ dog_gpt-4_out.txt
β βββ door.txt
β βββ door_gpt-4_out.txt
β βββ game.txt
β βββ game_gpt-4_out.txt
β βββ giant_brick.txt
β βββ giant_brick_gpt-4_out.txt
β βββ kaohsiung_engaging.txt
β βββ kaohsiung_engaging_gpt-4_out.txt
β βββ new_scence.txt
β βββ new_scence_gpt-4_out.txt
β βββ ntu_door.txt
β βββ ntu_door_gpt-4_out.txt
β βββ police car.txt
β βββ police car_gpt-4_out.txt
β βββ police car_man.txt
β βββ police car_man_gpt-4_out.txt
β βββ police.txt
β βββ police_gpt-4_out.txt
β βββ rocket.txt
β βββ rocket1.txt
β βββ rocket1_gpt-4_out.txt
β βββ rocket_gpt-4_out.txt
β βββ science_building.txt
β βββ science_building2.txt
β βββ science_building2_gpt-4_out.txt
β βββ science_building3.txt
β βββ science_building3_gpt-4_out.txt
β βββ science_building_gpt-4_out.txt
β βββ space1.txt
β βββ space1_gpt-4_out.txt
β βββ stone.txt
β βββ stone_gpt-4_out.txt
β βββ strange_window_building.txt
β βββ strange_window_building2.txt
β βββ strange_window_building2_gpt-4_out.txt
β βββ strange_window_building_gpt-4_out.txt
β βββ student.txt
β βββ student_gpt-4_out.txt
β βββ temple.txt
β βββ temple2.txt
β βββ temple2_gpt-4_out.txt
β βββ temple_gpt-4_out.txt
β βββ test.txt
β βββ test2.txt
β βββ test2_gpt-4_out.txt
β βββ test3.txt
β βββ test3_gpt-4_out.txt
β βββ test_gpt-4_out.txt
β βββ trip.txt
β βββ trip_gpt-4_out.txt
β βββ zoo.txt
β βββ zoo_gpt-4_out.txt
βββ requirements.txt
βββ third_party/
β βββ CenterNet2/
β βββ .circleci/
β βββ .clang-format
β βββ .github/
β βββ configs/
β βββ datasets/
β βββ demo/
β βββ detectron2/
β βββ dev/
β βββ docker/
β βββ projects/
β βββ setup.py
βββ train_deepspeed.py
βββ train_net.py
βββ visualizations/
βββ ζ什.txt
- Clone the GritAndGPT4 repository:
git clone https://github.com/kennysuper007/GritAndGPT4- Change to the project directory:
cd GritAndGPT4- Install the dependencies:
pip install -r requirements.txtUse the following command to run GritAndGPT4:
python demo.py --test-task DenseCap --config-file configs/GRiT_B_DenseCap_ObjectDet.yaml --input demo_images --output visualizations --output_preds predictions --LLM gpt-4 --opts MODEL.WEIGHTS models/grit_b_densecap_objectdet.pthContributions are welcome! Here are several ways you can contribute:
- Submit Pull Requests: Review open PRs, and submit your own PRs.
- Join the Discussions: Share your insights, provide feedback, or ask questions.
- Report Issues: Submit bugs found or log feature requests for GritAndGPT4.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your GitHub account.
- Clone Locally: Clone the forked repository to your local machine using a Git client.
git clone <your-forked-repo-url>
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear and concise message describing your updates.
git commit -m 'Implemented new feature x.' - Push to GitHub: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
Once your PR is reviewed and approved, it will be merged into the main branch.
This project is protected under the MIT License. For more details, refer to the LICENSE file.
- I modified the GPT-4 prompt to improve the quality and safety of the suggestions based on Kinan's code.