Set pipeline tag to feature-extraction, add link to code and usage examples
Browse filesThis PR fixes the model card by setting the pipeline tag to feature-extraction, allowing it to be discovered at https://huggingface.co/models?pipeline_tag=feature-extraction.
It also adds a link to the Github repository and usage examples, for more details.
12345678910111213141516171819202122232425262728293031---license: otherlicense_name: cogvlm2license_link: https://huggingface.co/THUDM/cogvlm2-llama3-chat-19B/blob/main/LICENSlanguage:- enspipeline_tag: text-generationtags:- chat- cogvlm2inference: false---# VisionReward-Image## IntroductionWe present VisionReward, a general strategy to aligning visual generation models——both image and video generation——with human preferences through a fine-grainedand multi-dimensional framework. We decompose human preferences in images and videos into multiple dimensions,each represented by a series of judgment questions, linearly weighted and summed to an interpretable and accuratescore. To address the challenges of video quality assess-ment, we systematically analyze various dynamic features of videos, which helps VisionReward surpass VideoScore by 17.2% and achieve top performance for video preference prediction.Here, we present the model of VisionReward-Image.## Merging and Extracting Checkpoint FilesUse the following command to merge the split files into a single `.tar` file and then extract it into the specified directory:```shcat ckpts/split_part_* > ckpts/visionreward_image.tartar -xvf ckpts/visionreward_image.tar```## Using this modelYou can quickly install the Python package dependencies and run model inference in our [github](https://github.com/THUDM/VisionReward).> This model utilizes fp32 precision parameters and requires the use of the sat (SwissArmyTransformer) library for invocation. For the bf16 (bfloat16) version of the model, please refer to the following link: [https://huggingface.co/THUDM/VisionReward-Image-bf16](https://huggingface.co/THUDM/VisionReward-Image-bf16)1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768---language:- enslicense: otherlicense_name: cogvlm2license_link: https://huggingface.co/THUDM/cogvlm2-llama3-chat-19B/blob/main/LICENSpipeline_tag: feature-extractiontags:- chat- cogvlm2inference: false---# VisionReward-Image## IntroductionWe present VisionReward, a general strategy to aligning visual generation models——both image and video generation——with human preferences through a fine-grainedand multi-dimensional framework. We decompose human preferences in images and videos into multiple dimensions,each represented by a series of judgment questions, linearly weighted and summed to an interpretable and accuratescore. To address the challenges of video quality assess-ment, we systematically analyze various dynamic features of videos, which helps VisionReward surpass VideoScore by 17.2% and achieve top performance for video preference prediction.Here, we present the model of VisionReward-Image.## Merging and Extracting Checkpoint FilesUse the following command to merge the split files into a single `.tar` file and then extract it into the specified directory:```shcat ckpts/split_part_* > ckpts/visionreward_image.tartar -xvf ckpts/visionreward_image.tar```## Using this modelYou can quickly install the Python package dependencies and run model inference in our [github](https://github.com/THUDM/VisionReward).### Usage#### VQA (Vision-Question-Answering)You can run the following commands for a checklist query. Available image and video questions can be found in `VisionReward_Image/VisionReward_image_qa.txt` and `VisionReward_Video/VisionReward_video_qa.txt`, respectively.```# For Image QApython inference-image.py --bf16 --question [[your_question]]# Input: image_path + prompt + question# Output: yes/no# For Video QApython inference-video.py --question [[your_question]]# Input: video_path + prompt + question# Output: yes/no```#### Scoring with VisionRewardYou can also calculate scores for images/videos with the following commands. The corresponding weights are in `VisionReward_Image/weight.json` and `VisionReward_Video/weight.json````# Scoring an Imagepython inference-image.py --bf16 --score# Input: image_path + prompt# Output: score# Scoring a Videopython inference-video.py --score# Input: video_path + prompt# Output: score```#### Compare Two VideosIt's also possible to directly compare the quality of two videos, leveraging the weights in `VisionReward_Video/weight.json`.```python inference-video.py --compare# Input: video_path1 + video_path2 + prompt# Output: better_video```> This model utilizes fp32 precision parameters and requires the use of the sat (SwissArmyTransformer) library for invocation. For the bf16 (bfloat16) version of the model, please refer to the following link: [https://huggingface.co/THUDM/VisionReward-Image-bf16](https://huggingface.co/THUDM/VisionReward-Image-bf16)
README.md+67-30