Datasets:
image
imagewidth (px) 1.6k
1.6k
| caption
stringlengths 20
756
|
---|---|
The low quality recording features a ballad song that contains sustained strings, mellow piano melody and soft female vocal singing over it. It sounds sad and soulful, like something you would hear at Sunday services. |
|
This song features an electric guitar as the main instrument. The guitar plays a descending run in the beginning then plays an arpeggiated chord followed by a double stop hammer on to a higher note and a descending slide followed by a descending chord run. The percussion plays a simple beat using rim shots. The percussion plays in common time. The bass plays only one note on the first count of each bar. The piano plays backing chords. There are no voices in this song. The mood of this song is relaxing. This song can be played in a coffee shop. |
|
The instrumental music features an ensemble that resembles the orchestra. The melody is being played by a brass section while strings provide harmonic accompaniment. At the end of the music excerpt one can hear a double bass playing a long note and then a percussive noise. |
|
A female vocalist sings this soprano solo. The tempo is slow with a classic orchestral accompaniment of violin harmony, an intense incessant cello melody, brass instrument and organ. The song is an intense, emotional, beseeching, sad, and imploring classic opera . |
|
This is a house music piece. There is a synth with a crisp sound playing the melody while a lot of turntable scratches can be heard in the background. An electronic drum beat with lots of snare beat repeat sounds provide the rhythm. The atmosphere is energetic and upbeat. This piece could be played at nightclubs or dance clubs. |
|
The low quality recording features a harpsichord solo melody. It sounds passionate, emotional and the recording is noisy. |
|
This music is instrumental. The tempo is medium fast with an energetic electric guitar lead. The music is minimalist with no accompaniment. It is youthful, powerful, enthusiastic, controlled, engaging and intense. This music is Hard Rock/Heavy Metal. |
|
This is a video game theme that is in the style of a kids song. The main melody is being played by a vibraphone while a glockenspiel can be heard adding texture. There is a medium-to-high pitch synth string sound that joins them later on. In the background, there are sleigh bells and a wind effect to imply a winter aura. The atmosphere is playful. The piece could be included in the soundtrack of a kids cartoon or a video game. |
|
This song contains percussive digital drums. In the background you can hear a string instrument playing a melody along with a digital flute sound. A keyboard is playing digital strings and brass sounds setting accents and a countermelody. The female voice is singing in the same melody as the strings. A bass is also playing the melody but at the low register. This song may be playing in a dance video-clip. |
|
This music is instrumental. The tempo is slow with a lead harmony on an acoustic guitar. The music is mellow, soft , mesmerising and nostalgic . There is minimal instrumentation with the guitarist playing the tune for the movie Godfather. This music is a tutorial on how to play free style guitar . |
|
This song is a Jazz instrumental . The tempo is slow with a lively saxophone harmony, groovy bass line, syncopated piano and slick drumming along with the sound of breeze, some clicking and super mario theme. The song in the background is classic Jazz. |
|
The low quality recording features a blues song that consists of a passionate male vocal singing over acoustic guitar melody in the left channel, muted acoustic guitar melody in the right channel of the stereo image, groovy bass, mellow snare and shimmering cymbals. It sounds passionate and emotional. |
|
A male rapper sings this exciting melody. The tempo is fast with a groovy bass line, grunge keyboard tones, strong drumming rhythm, various percussion hits and beeping tones. The song is pulsating and energetic. The audio quality is very poor. |
|
This is a breakbeat piece. There is a groovy electronic drum beat providing the rhythmic structure. A medium pitched pad is playing a repeated theme. There is a synth bass in the background. Occasional string stab hits can be heard. This piece could fit well in the soundtracks of crime movies taking place in the city and car racing video games. |
|
The low quality recording features a flat male vocal singing over digital piano melody and wooden percussion. The recording is noisy, in mono, loud and distorted. |
|
People are playing the same groove on a lot of percussive instruments. In the background you can hear shakers. Someone is strumming chords with an effect on an e-guitar and someone is playing fill-ins on acoustic drums. This song may be playing at a local live concert from a music school. |
|
This is a jazz music piece. There is a saxophone playing a jazzy solo for the melody. There is an upright bass playing in the background. The rhythmic background consists of a slow tempo acoustic drum beat that is played with brushes. The atmosphere is mellow. This piece could be playing in the background of a classy restaurant or a coffee shop. |
|
Someone is playing a minor chord composition on an acoustic piano while a female voice is singing with a lot of reverb on her voice. This song may be playing on a karaoke night. |
|
The low quality features a rock song that consists of a muffled passionate male vocal singing over wide acoustic rhythm guitars chords, shimmering cymbals, punchy kick and groovy bass. It sounds addictive, passionate and groovy - like something you would hear in pubs and bars during the 50s. |
|
The music excerpt features a sparse melody being played by an electronic sound that has a vibrating reverb effect on. A synth bass accompanies the melody by playing two notes per beat, one being low and the other an octave higher. In the background one can hear sound effects. |
|
This is an animation theme. There is a brass section playing the melody with the saxophone being the lead. The hi-hat cymbals are played with a feeling of swing on the acoustic drums. The atmosphere is sneaky and filled with intrigue. These characteristics make it a perfect soundtrack for a heist/detective cartoon or an animation movie. It could also work well in the soundtrack of a video game from a similar genre. |
|
Here we have a quartet of clarinet players playing a classical piece. One of them plays a rapidly ascending melodic motif. The others play sustained notes ranging from bass to alto which provide a support for the melody. |
|
This audio clip features the sound of pages being turned. The percussion is played at regular intervals. In the background, synth sounds are heard playing a soft melody. This sound is from a PC or mobile game. |
|
Live, amateur recording of record scratching over an instrumental old-school hip hop beat. |
|
The low quality recording features a reverberant trumpet melody playing over a wide brass melody and a mellow arpeggiated melody in the background. It sounds glorious, passionate, emotional and calming. |
|
This is an instrumental jam recording of a gear showcase. There is an electric guitar with a clear sound being played with an echo pedal. It gives the recording a dreamy feeling. This track can be used to lift guitar samples with effect for a beat. |
|
This is a neo-soul music piece. There is a male vocal singing melodically with another male back vocal singing in a more erotic fashion. The tune is played with a keyboard and a synth. There is a mellow bass line in the background. An acoustic-sounding electronic drum kit provides the rhythmic background. The piece has a seductive atmosphere to it. It could be played at a nightclub during earlier hours. It could also work well as the jingle of a fashion/fragrance advertisement. |
|
The clip features the tone of an alarm bell beeping. It beeps with a high and fuzzy tone. A button is then pressed. There is then the sound of a grungy electric guitar being played in a rock style. |
|
The low quality video features a cover of a kids song and it consists of a sweet girl vocal singing over acoustic rhythm guitar. The recording is in mono, noisy and it sounds fun and happy. |
|
This audio clip is just vocalisation. There is a loud drum roll with an evil laughter, sound of metal, followed by grunting and straining noises and then loud, noisy chewing and smacking of lips. |
|
This is an electronica piece played over a workout camp video. There is a male vocoder sound in the lead. The main theme is being played by the medium pitched keyboard. A groovy electronic drum beat with strong kicks provide the rhythmic background. |
|
Various percussive instruments are being played. In the foreground stays the cowbell. A trumpet is playing the lead melody while other trumpets are supporting along with a piano playing chords together with an organ sound. A steeldrum is ending the phrase of a melody with his own melody. An e-bass is playing a complex salsa groove. This song may be playing dancing salsa. |
|
This is a country music piece. There is a female vocalist singing melodically in the lead. The electric guitar is playing a simple tune with occasional fiddle tunes adding texture. The bass guitar is playing a simple bass line. There is a basic rock acoustic drum beat in the rhythmic background. It has a normal tempo. The atmosphere is easygoing. This piece could be used in the soundtrack of a teenage drama movie/TV series. It could also be used as an advertisement jingle. |
|
A female vocalist sings this soft melody. The song is slow tempo with a mellow electric guitar harmony, soft keyboard accompaniment , a soft lilting flute melody and subtle bass line. There is no use of percussion. The song is soft, mellow, emotional, nostalgic and sentimental . This song is Soft pop. |
|
The low quality recording features a passionate boy vocal singing over punchy kick, groovy bass, shimmering hi hats and crash cymbal hit and groovy piano melody. It sounds emotional and passionate. |
|
The low quality recording features a rock song that consists of wide electric guitar chord progressions, distorted bass guitar, shimmering hi hats, uptempo kick pattern and punchy snare. This instrumental sounds a bit muffled and imbalanced in volume, as the guitars are really loud, but it is very energetic regardless. |
|
This music is a melodic instrumental. The tempo is medium with a captivating electric guitar lead, rhythmic acoustic guitar, funky bass line, keyboard accompaniment, steady drumming and trumpets. The music is soothing, atmospheric, euphonious, youthful, and soulful. This instrumental is a Soft Rock/Funk pop. |
|
This audio contains two trombone players playing a warm melody. One in a higher key the other in a lower register. This song may be playing live listening to a performance in a theater. |
|
This is an instrumental flute piece. The flute is playing a solo while ambient samples of the wind and the birds singing can be heard in the background. There is also a very faint clattering bell-like percussion that can be heard. The piece is very relaxing. It could be used in a meditation video. It could also be used during the scenery shots in the soundtrack of a documentary. |
|
The low quality recording features a new age song that consists of sustained synth pad chord, bagpipe melody and subtle piano melody. It sounds mystical, soulful, passionate, emotional and ambient - like something you would hear in Scotland. |
|
The song is an instrumental. The tempo is medium fast with a guitar lead, guitar rhythm, steady rock drumming , a percussive bass line along with ambient street noises and roller skate wheel noises. The song is a home video sound track with lots of energy. The song audio quality is poor. |
|
The low quality recording features a reverberant acoustic guitar melody. It sounds passionate and emotional. The recording is noisy. |
|
This piece has no melody. Only percussion instruments can be heard in the background. The drumming is rapid and vigorous with a boomy bass drum and sounds of a helicopter, roaring, grunting,gunshots, blasts,fireworks, and clanging of metal and a siren at the end. The vibe is intense, sinister, hostile and dangerous. |
|
This music sounds oriental full of semitones and quarter-notes that are used in oriental music. A violin is playing a melody along with the keyboard player also playing a stringsound. Another string instrument is playing along while fast paced, pitched percussion is playing a rhythm with a lot of fill-ins. This song may be played at a live concert or an cultural event representing a country or area of this country. |
|
instrumental rock music with a drum kit, lots of cymbal crashes, acoustic guitar strumming, harmonized lead guitars and an active bass guitar. |
|
This song contains string instruments being played with a bow playing the main melody. Coming in after a flute starts playing the melody. An acoustic instrument is providing the rhythm. A guzheng is playing the same melody in a lower register. In the background you can hear crickets chirping. This song may be playing as a live performance from a music school. |
|
Someone is strumming an acoustic guitar while playing a fingerstyle melody and percussive sounds. This is an amateur recording. This song may be playing at a bonfire. |
|
A male singer sings this beautiful melody with backup singers in vocal harmony. The song is medium tempo with a percussive string section, strong bass line, guitar lead, steady drumming rhythm , keyboard accompaniment and various percussion clicks. The song is emotional and romantic. The song is of poor audio quality. |
|
This is an Alpine folk music piece. The piece is instrumental. It is being performed by an orchestra composed of the clarinets, the accordion, the cello and the acoustic guitar. The atmosphere is cheerful. This piece could be used in the soundtrack of a movie that takes place in the Alps region. |
|
The low quality recording features an excited crowd cheering for a flat female vocalist speaking afterwards. The recording is a bit noisy and in mono. |
|
A male vocalist sings this passionate song. The tempo is slow with emphatic vocals and an acoustic guitar accompaniment. The song is melodic, emotional,sentimental, passionate,pensive, reflective and deep. This song is Alternative Rock. |
|
The low quality recording features a reverberant flat male vocal singing over sustained strings melody, mellow piano melody, shimmering bells melody, shimmering hi hats and groovy bass. It sounds emotional, mellow and soft. |
|
This reggaeton song features a male voice singing the main melody. This is accompanied by other male voices singing backing vocals. The percussion plays only in the second half of the song. The beat is a reggae beat. A shaker plays a rhythm in the beginning of the song when the main voice sings. Synth sounds are played in the beginning of the song. This synth plays a harpsichord voice. Synth strings are also played in between lines in the song. This song can be played in a club. |
|
The song is an acapella cover of a game theme song. The song is medium tempo with no instrumentation by different male vocals engaging in different vocal mimicry of actual instruments, like bass line, melody , percussion and harmony tones. The song is cheerful and amateurish in production. The song is a cover of a popular game theme. |
|
This is an excerpt from a music documentary on harp making. A very brief harp performance can be heard in the beginning. There is a female voice that is speaking in an instructive manner about the extent of difference the wood material makes on the sound of the harp. |
|
A male country singer sings this passionate melody with backup singers in vocal harmony. The song is medium tempo with a strong drumming rhythm, guitar accompaniment, guitar lead, percussive bass line and percussion hits. The song is passionate and romantic. The song has bad audio quality. |
|
The Alternative/Indie song features a mixed background choir singing over punchy kick and snare hits, energetic cymbals that include crashes and ride hits, followed by groovy bass and strings section melody. The instrumental probably contains more instruments in the background, like a brass section or something orchestral, but due to the low quality mix of the song, it is not audible. Sounds epic and energetic, almost like a final boss theme song for video games. |
|
This is an instrument showcase jam. There is an electric guitar with a mellow sound strumming simple chords. The atmosphere is easygoing. Parts of this piece can be used as an advertisement jingle. It could also be sampled for use in beat-making. |
|
The low quality recording features a folk song that consists of a passionate female vocal singing over harmonica solo, groovy bass, shimmering hi hats, punchy snare, boomy kicks, groovy electric guitar melody and some claps. It sounds passionate and joyful. |
|
This instrumental pop song features an acoustic guitar being played fingerstyle. The notes are being plucked. Guitar harmonics are played in between the plucked notes. This song is played at a moderate tempo. There is no percussion in this song. There are no other instruments in this song. The mood of this song is relaxing. This song can be played in a coffee shop. |
|
The song has a tranquil and mellow vibe to it. It's a Christian worship song, with a singer that has a raspy tone to his voice and a calm approach to performing. The main instrumental factors are the acoustic guitar layers which are strummed, as well as piano chords and simple folk style drumming. |
|
The music features a few girl voices singing a melody in harmony. An acoustic guitar accompanies the singers with strummed chords. The overall atmosphere is calming and moving at the same time. |
|
The low quality recording features a gospel song that consists of harmonizing mixed choir singing. The recording is noisy, in mono and it sounds passionate, joyful, soulful and reverberant. |
|
This is a hip-hop music piece. There is a male vocal rapping in the lead. The beat has a soul music sample as the main structure. There is a choir singing melodically. The piano and the electric guitar are playing the tune with the backing of a bass guitar. The rhythmic background consists of a mild tempo acoustic drum beat. The atmosphere is groovy. This piece could be used in the soundtrack of a crime movie, especially during the scenes where a long-lost rival is making a comeback in the town. |
|
The low quality recording features a dark tinny bells melody played over synth pad chords, followed by echoing whispering male and haunting whispering female vocals. It sounds haunting, hypnotic, creepy, scary and like something that belongs to a horror movie. |
|
This is a live performance from a female cabaret quartet. They have different vocal ranges and harmonise every line of the song. The audience cheers and claps as they sing. The song feels jazzy. |
|
This song contains digital drums playing a groove along with an aggressive synth saw wave pad repeating the same simple melody. A male kid's voice is chopped into a sample creating a rhythmic phrase. The same goes for a female voice. So it sounds like they are singing. This is an amateur recording. This song may be playing in a funny video. |
|
This is a jingle piece in the background of an advertisement video. There is an acoustic guitar playing a generic tune while medium-pitched strings can be heard accompanying it. There is a slightly fast-paced acoustic drum beat as the rhythmic background. Sounds can be heard related to the ad such as a blood pulse sound effect, a pingpong ball bouncing and people shouting. The overall atmosphere is generic. |
|
This is the live performance of a classical music piece. The piece is being performed with a harpsichord. It is in the minor key. The piece is medieval sounding. It could fit perfectly in the soundtrack of a historical drama that takes place in the medieval era. |
|
This is a calm type of song which features a flute being intricately played on top of the various instruments. There is a violin creating a sustained tone underneath. The music feels mystical and enchanting. |
|
This audio contains a synth drone playing in the lower mid-range. While another synth pad is playing a melody in a higher register along with atmospherical sounds. This song may be playing for a documentary about the universe. |
|
A male singer sings this Latin dance melody. The tempo is fast with a harpist playing fast passages with an acoustic guitar strumming rhythm. The song is emotional and energetic. The audio quality is bad with ambient Street noises and high gain. |
|
A male singer leads backup singers in a vocal harmony. The song is medium tempo with a heavy percussive drum rhythm, strong bass line, keyboard accompaniment and a trumpet playing in unison with the vocals. The song is groovy and passionate and sounds like the theme song of a football club. The song audio quality is very poor. |
|
This song features percussion being played at a fast tempo. The beat is of moderate difficulty. The kick is played on the first count of each bar. The snare is played on the second and fourth counts of each bar. The hi-hat is played at a unique rhythm with accents on the first 'and' and the third, third and and fourth counts. There are no voices in this song. This is an instrumental song at a fast tempo. There are no other instruments in this song. |
|
A male vocalist sings this lively melody in a foreign language. The tempo is fast with a loud and banjo harmony, tambourine beats and tapping beats. The song is a spirited, cheerful,celebratory, happy, enthusiastic and festive Regional/Folk Song. |
|
The low quality recording features a mixed harmonized vocals singing over quiet instrumental playing in the background. It is noisy and in mono, as it sounds heartfelt and emotional. It seems like it is a recording of a karaoke session, considering the volume balance between the vocals and instrumental. |
|
The low quality recording features a hip hop song that consists of a flat male vocal rapping over punchy kick and snare hits, shimmering hi hats, DJ scratching sound effects and groovy bass. It sounds energetic, upbeat and groovy. |
|
This is a jazz song with some latin infusions into the style. The brass section plays bright and ascending melodies. The percussionists play bongos and snares with brushes. The song is fun and suitable for some loose dancing. |
|
The low quality recording features a DJ scratching a vinyl of an electro dub song that consists of uptempo hi hats, punchy kick and snare hits, short bass stabs, soft crash cymbal and simple synth melody. It sounds energetic, cool and groovy. |
|
This song is used as a theme for a prank video. There is a keyboard and bass guitar providing the melodic background while a dissonant synth plays an on-the-nose comedic tune. There is a funky but simple electronic drum beat for the rhythmic background. Scratching sound effects and a laughing track were also used to emphasize the comedic element. |
|
This is a bluegrass music piece. There is a mandolin playing the main tune as the lead while a banjo and an acoustic guitar are supporting it in the melodic background. There is a joyful feeling to this piece. It could be used in the soundtrack of a movie or a TV show with a rural setting. It could also be used in the background of pastoral social media content. |
|
This is a country pop music piece. There is a female vocalist singing melodically as the lead. The melody comprises various elements such as the electric guitar, the bass guitar, the harmonica and the banjo. There is a rock acoustic drum beat in the rhythmic background. The atmosphere is easygoing. This piece could be the opening theme of a teenage sit-com. |
|
This audio contains a fully overdriven aggressive kick sound with a lot of digital noise sounds. This is an amateur recording. This song may be playing in a post apocalyptic video game. |
|
This music is an electronic instrumental. The tempo is medium fast with synthesiser arrangements, DJ mixer, turn table and digital drums. The music is futuristic , emphatic, intense, loud , enthusiastic; heavily synthesised and groovy. It has a psychedelic, trace-like vibe. |
|
A female teen voice is singing along with backing voices and screams. While acoustic drums are playing along with a simple bassline. The e-guitar is playing the suiting chords on top along with a high pitched sound coming out from a digital piano or organ. This song may be playing in a movie for the whole family. |
|
The Electro song features a repetitive synth keys melody playing over snare roll, claps, shimmering open hats, all being affected with a filter modulation, that serves as a build up element. It sounds exciting and energetic. |
|
This song contains several synth pad sounds from the low, to the mid and higher register. Then the sounds stop and a glass breaking sound comes in as it gets reversed right away. This song may be playing in an advertisement. |
|
This is the opening theme of a program that was meant for kids. It is in an instrumental piece. There is a keyboard playing the main melody in the lead. There is a bass guitar playing in the background. The rhythm is provided by a fast-tempo acoustic drum beat. There are various sound effects that add a lively texture to this piece. The atmosphere is playful. This piece could be used in kids shows or cartoons. It could also be played during kindergarten activities or child birthday parties. |
|
The song is an instrumental abstract piece. The song is medium tempo but with no actual pulse, whizzing sounds, shaker tones and buzzing noise and keyboard tones.The song is chaotic and highly experimental. The song is a psychedelic instrumental like a music Rorschach test. |
|
This is an ambient house music piece. There is no singer in the music. There are various resonating synth sounds used with ambient sound effects. Electronic drum hits can be heard reverberating in the piece. The atmosphere is airy. The best use for this piece would be either as an advertisement jingle or as a background music for a tutorial/instructive video. |
|
Here we have a slow piano piece played in a major key. The peace feels calm and happy. |
|
This children's song features a male voice singing the main melody. There are other voices singing backing vocals. This is accompanied by percussion playing a simple beat. A guitar strums the chords accenting the strums in between lines. The bass plays the root notes of the chords with a reggae feel. The keyboards play chords in the background. This song can be played at a children's party. |
|
This song has a characteristically disco-like groove, with its funky bassline. There is an electric guitar where single notes are being plucked. The vocalist has an alternative indie type voice. |
|
The song is a funky, soulful disco song. The whole vibe is vibrant and upbeat and features a bouncy groove from a bass guitar as well as bright and shimmery sounding brass instruments. There's a sustained silky synth sound. The singer sounds cheerful. The song is suitable for dancing. |
|
The low quality recording features a distorted, processed male vocal with delay effect on. The recording is very noisy and in mono. |
|
This song features a guitar playing a solo. This is played in the style of a banjo in a bluegrass song. The guitar is playing fast licks. The bass plays the root note and lower fifth of the chords. A percussion plays a simple beat and ends with a crash. There are no voices in this song. This song is an instrumental song. Due to the low quality of the audio, other instruments cannot be identified. This song can be played in a bluegrass concert. |
|
This music is an electronic instrumental. The tempo is fast with atmospheric synthesisers playing an intense harmony with boomy keyboard feedback. There is no other instrument or accompaniment except for a whooshing sound. The music sounds amateur and has a sinister, eerie, mysterious, spooky, scary vibe. |
|
This is a progressive rock music piece. There is a male vocalist singing melodically. The piano is playing the main melody while there is an airy keyboard backing. The atmosphere is gentle and sentimental. This piece could be used in the ending credits of a teenage drama movie. |
|
The low quality recording features a live opera performance sung by passionate female vocalists and followed by sustained and plucked strings melody. The recording is very noisy and the stereo image is unbalanced, since the audio from the left channel is occasionally cut out. It sounds emotional, mellow and passionate. |
|
This piece is a compilation of an opera singer's high-pitched singing that shows how high of a pitch she can reach. For the most part, she is holding a single high note as the strings in the orchestra provide the harmonic background. |
End of preview. Expand
in Dataset Viewer.
Google/Music-Capsの音声データをスペクトログラム化したデータ。
- Music Cpasとは:https://huggingface.co/datasets/google/MusicCaps
- GrayScaleじゃないほうもあるから見てね(⋈◍>◡<◍)。✧♡(これ)
基本情報
- sampling_rate: int = 44100
- 20秒のwavファイル -> 1600×800のpngファイルへ変換
- librosaの規格により、画像の縦軸:(0-10000?Hz), 画像の横軸:(0-40秒)
- 詳しくはlibrosa.specshow() -> https://librosa.org/doc/main/auto_examples/plot_display.html
使い方
0: データセットをダウンロード
from datasets import load_dataset
data = load_dataset("mickylan2367/spectrogram")
data = data["train"]
1: データローダーへ
- こんな感じの関数で、データローダーにできます。
from torchvision import transforms
from torch.utils.data import DataLoader
BATCH_SIZE = ??? # 自分で設定
IMAGE_SIZE = ???
TRAIN_SIZE = ??? # 訓練に使用したいデータセット数
TEST_SIZE = ??? # テストに使用したいデータセット数
def load_datasets():
data_transforms = [
transforms.Resize((IMG_SIZE, IMG_SIZE)),
transforms.ToTensor(), # Scales data into [0,1]
transforms.Lambda(lambda t: (t * 2) - 1) # Scale between [-1, 1]
]
data_transform = transforms.Compose(data_transforms)
data = load_dataset("mickylan2367/spectrogram")
data = data["train"]
train = data[slice(0, TRAIN_SIZE, None)]
test = data[slice(TRAIN_SIZE, TRAIN_SIZE + TEST_SIZE, 0)]
for idx in range(len(train["image"])):
train["image"][idx] = data_transform(train["image"][idx])
test["image"][idx] = data_transform(test["image"][idx])
train = Dataset.from_dict(train)
train = train.with_format("torch") # リスト型回避
test = Dataset.from_dict(train)
test = test.with_format("torch") # リスト型回避
# or
train_loader = DataLoader(train, batch_size=BATCH_SIZE, shuffle=True, drop_last=True)
test_loader = DataLoader(test, batch_size=BATCH_SIZE, shuffle=True, drop_last=True)
return train_loader, test_loader
参考資料とメモ
- (memo)ぶっちゃけグレースケールもカラーバージョンをtorchvision.transformのグレースケール変換すればいいだけかも?
- ダウンロードに使ったコードはこちら
- 参考:https://www.kaggle.com/code/osanseviero/musiccaps-explorer
- 仕組み:Kaggleの参考コードでwavファイルをダウンロードする->スペクトログラムつくりながらmetadata.jsonlに
をなどと言ったjson列を書き込み、これをアップロードした{"filename":"spectrogram_*.png", "caption":"This is beautiful music"}
- Huggingfaceのデータビューアが動かなくなったら、一度GoogleColabでそのデータセットをダウンロードしてみることもおすすめ 意外とHuggingfaceがバグっているだけかも(実話(´;ω;`))
- Downloads last month
- 121